Поделиться через


CeGetRawTime (Windows Embedded CE 6.0)

1/6/2010

This function reads the real-time clock (RTC) and offsets it with the offset value that is calculated on every time change. The monotonically increasing clock is guaranteed to run at the speed of the RTC. The absolute value is meaningless because it is not guaranteed to be related to the local time or the system time in any way.

Syntax

BOOL CeGetRawTime(
    ULONGLONG * pui64Millsec
);

Parameters

  • pi64Time
    [out] Pointer to a unsigned 64-bit value to receive monotonically increasing time, in milliseconds.

Return Value

TRUE indicates success. FALSE indicates failure. For more information, call GetLastError.

Remarks

The time returned from CeGetRawTime is only guaranteed to be monotonically increasing in-between boots. For services that require elapsed time across boots, do the following:

  • Register time change notification.
  • When notified of time change, read the current raw-time offset with CeGetRawTimeOffset, and persist the offset with method applicable.
  • Take into account the persisted offset on elapse time calculation.

Requirements

Header pkfuncs.h
Library coredll.lib
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Reference

Time Functions
CeGetRawTimeOffset

Other Resources

Monotonically Increasing Clock
Kernel Migration