Microsoft KB Archive/260419

From BetaArchive Wiki
Knowledge Base


Article ID: 260419

Article Last Modified on 12/27/2003



APPLIES TO

  • Microsoft Windows CE Platform Builder 2.11
  • Microsoft Windows CE Platform Builder 2.12



This article was previously published under Q260419

SYMPTOMS

The wMilliseconds value in the SYSTEMTIME structure is always zero (0) when you use the GetSystemTime function on a x86 Windows CE PC-based (CEPC) reference platform.

CAUSE

The x86 CEPC reference platform supplied with the Platform Builder implements the OEMGetSystemTime OEM's Adaptation Layer (OAL) function by reading the real-time clock chip. The real time clock chip on standard PC platforms does not maintain a millisecond timer.

RESOLUTION

When adapting the Windows CE OAL for a custom platform, a source for the millisecond timer must be found and used in the OEMGetSystemTime OAL function. For example, you may choose to maintain a high resolution clock tick counter and calculate the time of day each time OEMGetRealTime is requested. A tick counter must be corrected each time the device returns from a suspend state.

STATUS

This behavior is by design.

MORE INFORMATION

Microsoft Windows 98-based computers, Microsoft Windows NT-based computers and MS-DOS platforms maintain a tick counter that represents the number of ticks since midnight. The count is updated 18.2 times per second. When the time of day is requested the operating system calculates the hours, minutes, seconds and milliseconds from this counter. The milliseconds value jumps in approximately 54.9 millisecond increments.

Keywords: kbprb KB260419