This commit is contained in:
Digital Data - Marlon Schreiber
2018-01-05 14:59:32 +01:00
parent 27abfd0b74
commit ef06120f13
13 changed files with 470 additions and 784 deletions

View File

@@ -513,10 +513,23 @@ Module ModuleHelperMethods
End Sub
Public Function Done() As Long
If LogErrorsOnly = True Then Return 0
stopwatch.Stop()
Dim message = String.Format("{0, 5}ms || {1}", stopwatch.ElapsedMilliseconds, label)
Console.WriteLine(message)
If LogErrorsOnly = False Then ClassLogger.Add(message, False)
Dim ts As TimeSpan = stopwatch.Elapsed
Dim timespan_ = String.Format("{0:00}:{1:00}.{2:00}", ts.Minutes, ts.Seconds, ts.Milliseconds / 10)
If ts.Minutes > 0 Then
timespan_ = String.Format("{0:00}:{1:00}.{2:00}", ts.Minutes, ts.Seconds, ts.Milliseconds / 10)
ElseIf ts.Seconds > 0 And (ts.Minutes > 0) = False Then
timespan_ = String.Format("{0:00}.{1:00} seconds", ts.Seconds, ts.Milliseconds / 10)
ElseIf (ts.Seconds > 0) = False And ts.Milliseconds > 0 Then
timespan_ = String.Format("{0:00}.{1:00} seconds", ts.Seconds, ts.Milliseconds / 10)
End If
If timespan_ <> "00:00.00" Then
Dim message = String.Format("{0} || {1}", timespan_, label)
Console.WriteLine(message)
If LogErrorsOnly = False Then ClassLogger.Add(message, False)
End If
Return stopwatch.ElapsedMilliseconds
End Function