Microsoft KB Archive/68554

INF: Windows Time Inaccurate When MS-DOS Runs Full Screen

PSS ID Number: Q68554 Article last modified on 04-26-1993

3.00 3.10 WINDOWS

Summary: Windows time, a value maintained by the Microsoft Windows graphical environment to indicate the number of milliseconds that have passed since the Windows session started, does not remain accurate when an MS-DOS application runs full-screen.

More Information: Windows time is a 32-bit value that is initialized to zero at load time that is updated during system operations to maintain the number of milliseconds that have passed. According to the documentation, Windows time is the amount of time that has passed since the session started, plus or minus 55 milliseconds. However, running an MS-DOS application full-screen will severely affect the update of the count, and thus, the value itself. In real or standard mode, where an MS-DOS application must be run full-screen, Windows time stops entirely. Under 386 enhanced mode, the measured Windows time slows to approximately 1/16th of real time. This time slowdown does not have a serious impact on the Windows operating system itself. However, it will affect applications that depend on the accuracy of Windows time. The time value that is returned by the following three functions is affected by this phenomenon:

The value returned by GetMsgTime is also available as a field in the MSG data structure. There is no method to work around this problem with respect to the functions mentioned above. However, an application can employ another method to retrieve time information. In 386 enhanced mode, a VxD can retrieve accurate time information from the enhanced mode layer. VITD is one of the sample applications provided with version 3.1 of the Microsoft Device Driver Kit (DDK) that installs a VxD to allow an application to accurately measure time intervals. VITD is also available in the Software Library. VITD can be found in the Software/Data Library by searching on the word VITD, the Q number of this article, or S12887. VITD was archived using the PKware file- compression utility. Alternatively, an application can retrieve the current time from MS-DOS through Interrupt 21h Function 2Ch. For more information on the causes of this phenomenon, query in the Microsoft Knowledge Base on the following words: prod(winsdk) and slow and timer

Additional reference words: 3.00 3.10 DDKVXD softlib VITD.ZIP Copyright Microsoft Corporation 1993.