How To Retrieve Elapsed Time Since Windows StartedLast reviewed: June 21, 1995Article ID: Q113325 |
The information in this article applies to:
- Standard and Professional Editions of Microsoft Visual Basic for Windows, version 3.0
SUMMARYThe Windows API provides two functions (GetCurrentTime and GetTickCount) that return the number of milliseconds that have elapsed since Windows started. The GetTickCount function is identical in function to the GetCurrentTime function. However, GetTickCount should be used instead of GetCurrentTime because the name more closely matches its function.
MORE INFORMATIONGetTickCount returns the number of milliseconds since Windows started, and it resets to zero (0) if Windows is run continuously for approximately 49 days. After the value has been retrieved, you can convert it to minutes and seconds and display it in the hh:mm:ss format.
Step-by-Step Example
REFERENCESFor more information, see the Microsoft Windows SDK, Programmer's Reference (Book 2), Functions.
|
Additional reference words: 2.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |