MS
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user