Click to See Complete Forum and Search --> : Milliseconds display


Brian Kristensen
October 11th, 1999, 02:43 AM
Could someone enlighten me please.
I am trying to write a routine which will make a note of how long a query takes to run. My problem is that I cannot find any reference to reading the current time including milliseconds.
e.g. 3:34:18.245

All the date/time functions only seem to go down to seconds. I have played around with the timer function but I can't believe there isn't a better way.

Thanks.

Lothar Haensler
October 11th, 1999, 02:47 AM
the GetSystemTime API fills a SYSTEMTIME structure that has a Milliseconds field.

Francois
October 11th, 1999, 02:48 AM
Try API function : GetTickCount

Crazy D @ Work
October 11th, 1999, 02:48 AM
You can also use the Timer function, eg.
Dim start as double
start = Timer
' do what you want
Msgbox Timer - start

Crazy D @ Work :-)

Lothar Haensler
October 11th, 1999, 03:06 AM
AFAIK Timer does not return Milliseconds. Am I wrong?

Crazy D @ Work
October 11th, 1999, 03:10 AM
Oopsie guess it's too early to think...
In reply to:


Timer Function

Returns a Single representing the number of seconds elapsed since midnight.

Syntax

Timer

Remarks

In Microsoft Windows the Timer function returns fractional portions of a second.




I understood it was to see how long a query takes to execute, I always use Timer for that... but I you're right...

Crazy D @ Work :-)