Group: Time - Library: kernel32
Using the GetTempFileName
Retrieving the elapsed time since the system was started
Time in milliseconds represented as string (e.g. 1 hour 24 min 36 sec)
How to put a horizontal text scrolling on the form (a news line, marquee)
Peer-to-peer LAN messenger built with Mailslot API functions
How to play AVI file on the _screen
GDI+: how to make VFP controls visually shake and shudder
GDI+ fun: roach-infested desktop
GDI+: Implementing image scrolling with inertia
DWORD GetTickCount(VOID);
DECLARE LONG GetTickCount IN kernel32
This function has no parameters.
The return value is the number of milliseconds that have elapsed since the system was started.
DWORD or INTEGER both allow to keep 4 bytes, that means maximum of 4,294,967,295 milliseconds -> 1193 hours -> 49.7103 days.
So after 49 and something days without rebooting the computer, this 32-bit counter overflows.
Use the QueryPerformanceFrequency and QueryPerformanceCounter functions to access the high-resolution performance counter that operates 64-bit values.
Read more about time counters.
The GetTickCount64 function is free of the 49.71 limitation, if only one can find a way to return its 8-byte return value back to FoxPro. Unless, of course, this function is called in external library.
The timeGetTime function (Winmm.dll) is the absolute twin of the GetTickCount.
DECLARE LONG timeGetTime IN winmm