My Assistant
|
|
Jan 9 2007, 05:06 PM
Post
#1
|
|
|
UtterAccess Veteran Posts: 484 From: Florida |
Is there a way to format a time with milliseconds? I am working on a project for a friend with racing and he wants his lap times with milliseconds because many of the times are very close.. Seems silly but I can't seem to find it.. perhaps I am just supposed to construct it and decontruct if I want to perform any math on them?
CB |
|
|
|
![]() |
Jan 9 2007, 07:53 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 3,752 From: Australia (NSW) |
Try the following code , which like Brent uses an API call, but also has subroutines for 'StartINg' and 'Stopping' with the 'STOP calculating the elapsed time in millisecs.
CODE Public Declare Function adh_apiGetTime Lib "winmm.dll" _
Alias "timeGetTime" () As Long Global lngStartTime As Long ' ' ' Sub adhStartTimer() ' Start the timer, storing the value in ' the module global, lngStartTime. lngStartTime = adh_apiGetTime() End Sub ' ' Function adhEndTimer() as Long ' End timing, and return the difference between the ' current time and lngStartTime adhEndTimer = adh_apiGetTime() - lngStartTime End Function |
|
|
|
Coldbrain Time.. Hours.. Minutes.. Seconds.. Milliseconds? Jan 9 2007, 05:06 PM
datAdrenaline Re: Time.. Hours.. Minutes.. Seconds.. Milliseconds? Jan 9 2007, 05:42 PM
KingMartin Re: Time.. Hours.. Minutes.. Seconds.. Milliseconds? Jan 9 2007, 06:02 PM
Coldbrain Re: Time.. Hours.. Minutes.. Seconds.. Milliseconds? Jan 9 2007, 08:03 PM
KingMartin Re: Time.. Hours.. Minutes.. Seconds.. Milliseconds? Jan 10 2007, 01:37 AM
StuKiel Re: Time.. Hours.. Minutes.. Seconds.. Milliseconds? Jan 10 2007, 02:52 AM
KingMartin Re: Time.. Hours.. Minutes.. Seconds.. Milliseconds? Jan 10 2007, 06:18 AM![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 07:02 PM |