Click to Rate and Give Feedback
MSDN
MSDN Library
System Services
Time
Time Reference
Time Functions
 GetTickCount64 Function
GetTickCount64 Function

Retrieves the number of milliseconds that have elapsed since the system was started.

Syntax

C++
ULONGLONG WINAPI GetTickCount64(void);

Parameters

This function has no parameters.

Return Value

The number of milliseconds.

Remarks

The resolution of the GetTickCount64 function is limited to the resolution of the system timer, which is typically in the range of 10 milliseconds to 16 milliseconds. The resolution of the GetTickCount64 function is also affected by adjustments made by the GetSystemTimeAdjustment function.

If you need a higher resolution timer, use a multimedia timer or a high-resolution timer.

To obtain the time the system has spent in the working state since it was started, use the QueryUnbiasedInterruptTime function.

To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or later. For more information, see Using the Windows Headers.

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

Time Functions
Windows Time

Send comments about this topic to Microsoft

Build date: 10/8/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
GetTickCount64 is in milliseconds, not ticks      vcsjones ... Thomas Lee   |   Edit   |   Show History
Despite the name, it returns the number of milliseconds of uptime, not ticks.
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker