MartyConnelly
martyconnelly at shaw.ca
Mon Feb 14 09:51:02 CST 2005
Not sure how fine you want to time, here are a couple of finer methods --In the Declarations section-- ' GetTickCount returns the number of milliseconds that Windows has been running. Declare Function GetTickCount& Lib "kernel32" () ---from the DebugWindow--- ? "It has been " & gettickcount() & " milliseconds since Windows started" It has been 61604492 milliseconds since Windows started ? "It has been " & gettickcount() & " milliseconds since Windows started" It has been 61610871 milliseconds since Windows started or these functions to get clock frequency and ticks I have a class to do these somewhere ' determine if system has Performance Counter and get its frequency ' returns ticks/sec (1.193.180 on my machine PII 350) Private Declare Function QueryPerformanceCounter Lib "kernel32" ( _ lpPerformanceCount As Currency) As Long Private Declare Function QueryPerformanceFrequency Lib "kernel32" ( _ lpFrequency As Currency) As Long Gustav Brock wrote: >Hi all > >Has anyone used this? >It is a classic in the callback function example but I don't recall any >reference to it. > >It seems to return seconds from midnight as well as a fraction of a >second with a resolution of about 1/60 second. Thus it could be used >where you need a resolution of less than one second. > >/gustav > > -- Marty Connelly Victoria, B.C. Canada