MS .08B
This commit is contained in:
@@ -221,5 +221,44 @@ Public Class RefreshHelper
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Public Class SW
|
||||
Public label As String
|
||||
Public stopwatch As Stopwatch
|
||||
|
||||
Public Sub New(label As String)
|
||||
Me.label = label
|
||||
stopwatch = New Stopwatch()
|
||||
stopwatch.Start()
|
||||
End Sub
|
||||
|
||||
Public Function Done() As Long
|
||||
If LOGCONFIG.Debug = False Then
|
||||
Return 0
|
||||
End If
|
||||
|
||||
stopwatch.Stop()
|
||||
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)
|
||||
|
||||
If LOGCONFIG.Debug = True Then
|
||||
LOGGER.Debug(message)
|
||||
End If
|
||||
|
||||
End If
|
||||
Return stopwatch.ElapsedMilliseconds
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user