Thursday, July 9, 2009

More simpler Counting Elapsed Time with milisecond - VB6

Sub ElapsedTime()
Dim StartTime As Double, EndTime As Double

'Stores start time in variable "StartTime"
StartTime = Timer

'Place your code to be timed here

'Stores end time in variable "EndTime"
EndTime = Timer

'Prints execution time in the debug window
Debug.Print "Execution time in seconds: ", EndTime - StartTime
End Sub

Copied from MSDN

No comments: