Microsoft KB Archive/821893

= The system clock may run fast when you use the ACPI power management timer as a high-resolution counter on Windows 2000-based, Windows XP-based, and Windows Server 2003-based computers =

Article ID: 821893

Article Last Modified on 12/4/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
 * Microsoft Windows XP Home Edition
 * Microsoft Windows XP Professional
 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition

-





SYMPTOMS
When a Microsoft Windows 2000-based, Microsoft Windows XP-based, or Microsoft Windows Server 2003-based computer runs in Advanced Configuration and Power Interface (ACPI) mode and uses the ACPI Power Management Timer (PMTimer) as a high-resolution counter, the system clock may run fast.



CAUSE
This issue may occur if the time increment in a program changes and the Hardware Abstraction Layer (HAL) cannot measure the time interval between successive clock interrupts. This causes the system clock to lose a short period of time. When the HAL misses many time-interval measurements in quick succession, the time loss may be significant.

Note
 * This issue may occur on a computer that is running Halaacpi.dll (UP, ACPI, or APIC), Halmacpi.dll (MP, ACPI, or APIC), and Halmps.dll (MP, non-ACPI, or legacy) because these DLLs use the Real Time Clock (RTC) to generate clock interrupts.
 * This issue does not occur on a computer that is running Halaacpi.dll (UP, ACPI, or PIC) or Halx86.dll (UP, non-ACPI, or legacy) because these DLLs use the 8254 Programmable Interval Timer (PIT) to generate clock interrupts.



WORKAROUND
To work around this issue, use one of the following methods:
 * Modify the program to call the timeBeginPeriod function at startup and to call the timeEndPeriod function on exit. This workaround eliminates repeated time increment changes.
 * Modify the program to use the QueryPerformanceCounter API.

Additional query words: acpi timer time delay system clock fast pmtimer timebeginperiod timeendperiod queryperformancecounter

Keywords: kbnofix kbprb KB821893

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.