would to requesting for a code that would monitor
time elapsed.
Any guru's willing to help?
Printable View
would to requesting for a code that would monitor
time elapsed.
Any guru's willing to help?
well ive got no idea
but could u help me out with the phone thing?
You can use the GetTickCount API function to get the number of milliseconds since system startup. It is a long value, so it overflows and resets to 0 after (I think) about 49.7 or so days :) (4,294,967,296 milliseconds). Here's the declaration:
Stick that in a module. You can time things by recording the tick count at the beginning of the process, and then subtracting that value from subsequent sample tick counts. So, in your code, you might have something like this:Code:Public Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount" () As Long
Code:Dim startTick As Long
Dim currentTick As Long
Dim interval As Long
startTick = GetTickCount
'Other code could go here if you were timing the length
'of time your code took to execute
'If you make the startTick variable global or static you
'can set it, then let the user do stuff and time their actions
currentTick = GetTickCount
interval = currentTick - startTick
MsgBox "Time = " & interval & " milliseconds."
Alternatively, you can get Windows to run a timer for you, using the SetTimer and KillTimer functions. You'll have to look that up in the help though, because I only really know how to do that in C.
Hope that helps some :)
thanks harry!