home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic 6 Unleashed…sional Reference Edition)
/
Visual_Basic_6_Unleashed_Professional_Reference_Edition_Sams_1999.iso
/
Source
/
CHAP35
/
309X3701.TXT
next >
Wrap
Text File
|
1998-05-03
|
946b
|
45 lines
Private Sub cmdTest_Click()
Dim Start, Finish, TotalTime
If Option1.Value = True Then
Start = Timer
'Put the code you wish to time
'here!
'End of Code time test
Finish = Timer
Else
'Option 2 selected
Start = Timer
'Put the code you wish to time
'here!
'End of Code time test
Finish = Timer
End If
TotalTime = Finish - Start ' Calculate total time.
'
'Set up display results
'
If Option1.Value = True Then
'Option 1
lblOpt1.Caption = "Total time to execute " & _
Option1.Caption & ": " & _
TotalTime
Else
'Option 2
lblOpt2.Caption = "Total time to execute " & _
Option2.Caption & ": " & _
TotalTime
End If
End Sub