OEMGetRealTime

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/27/2008

This function is called by the kernel to retrieve the time from the real-time clock.

Syntax

BOOL OEMGetRealTime(
  LPSYSTEMTIME lpst 
);

Parameters

  • lpst
    [out] Pointer to the SYSTEMTIME structure that contains the current time.

Return Value

If this function succeeds, it returns TRUE.

If this function fails, it returns FALSE.

Remarks

This function must be re–entrant and, thus, must protect the hardware from being accessed multiple times.

In the OAL code, store the year value so it supports a 100-year range; for example, 1950–2050.

OEMGetRealTime is called by GetSystemTime when the clock is running in hardware mode. In hardware mode, OEMGetRealTime queries the RTC. Alternatively, you can run the clock in software mode by setting a registry key. In software mode, a clock is simulated in software based on GetTickCount, which tracks clock ticks using the timer. To specify software mode for the clock, set HKEY_LOCAL_MACHINE\Platform\"SoftRTC" = 1. This registry key must be set at boot time to have any effect.

Requirements

Header nkintr.h
Library Nk.lib
Windows Embedded CE Windows CE 2.10 and later

See Also

Tasks

Implementing the OEMPlatformInit Function

Reference

OEMIdle
OEMSetAlarmTime

Other Resources

SetSystemTime
SYSTEMTIME