StopWatch Object
Description
The stopwatch can accurately measure time periods. The resolution depends on the computer hardware, but should more than a millionth of a second.
Methods
Start
Lap
Stop
Resolution
Example
Set sw = CreateObject("Toolsack.Stopwatch")
MsgBox "The resolution of this stopwatch is to the nearest " & sw.Resolution & " of a second"
sw.Start
For i = 1 To 1000
a = 1 + 2
Next
MsgBox "A loop with one thousand additions took " & sw.Lap & " seconds"
sw.Start
MsgBox "Press OK now!"
t = sw.Stop
MsgBox "You took " & t & " seconds to press the button"
Samples
Articles
We always want to hear your feedback. Send to feedback@toolsack.com.
© 2000-2001 Toolsack Software Ltd.