Using Win32 functions in Visual FoxPro Image Gallery
Time
..msdn
CompareFileTime
FileTimeToLocalFileTime
FileTimeToSystemTime
GetFileTime
GetLocalTime
GetSystemTime
GetSystemTimeAdjustment
GetSystemTimeAsFileTime
GetTickCount
GetTimeZoneInformation
LocalFileTimeToFileTime
QueryPerformanceCounter
QueryPerformanceFrequency
SetFileTime
SetTimeZoneInformation
SystemTimeToFileTime
Code examples:
GDI+ fun: roach-infested desktop
GDI+: how to make VFP controls visually shake and shudder
GDI+: Implementing image scrolling with inertia
How to play AVI file on the _screen
How to put a horizontal text scrolling on the form (a news line, marquee)
Peer-to-peer LAN messenger built with Mailslot API functions
Retrieving the elapsed time since the system was started
Time in milliseconds represented as string (e.g. 1 hour 24 min 36 sec)
Using the GetTempFileName
GetTickCount
    Add comment     W32 Constants      Translate this page
Retrieves the number of milliseconds that have elapsed since the system was started.
Code examples:
GDI+: Implementing image scrolling with inertia
How to put a horizontal text scrolling on the form (a news line, marquee)
Time in milliseconds represented as string (e.g. 1 hour 24 min 36 sec)
Peer-to-peer LAN messenger built with Mailslot API functions
GDI+: how to make VFP controls visually shake and shudder
How to play AVI file on the _screen
GDI+ fun: roach-infested desktop
Using the GetTempFileName
Retrieving the elapsed time since the system was started
Declaration:
DWORD GetTickCount(VOID);
FoxPro declaration:
DECLARE LONG GetTickCount IN kernel32
Parameters:
This function has no parameters.
Return value:
The return value is the number of milliseconds that have elapsed since the system was started.
Usage:
* cannot be more simple
? GetTickCount()
? GetTickCount() / (24 * 60 * 60 * 1000)
My comment:
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
Word Index links for the GetTickCount :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-25 12:00:00
Modified: 2009-01-07 14:32:13
Visited in last 7 days: 30
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Google
Advertise here!