SAMPLE: High-Resolution Timing Services

Last reviewed: February 15, 1996
Article ID: Q75910
The information in this article applies to:
  • Microsoft Software Development Kit (SDK) for Windows version 3.0

SUMMARY

TIMESMP is a file in the Microsoft Software Library that demonstrates using the high-resolution timer services provided by the Microsoft Multimedia Windows graphical environment.

Download TIMESMP.EXE from the Microsoft Software Library (MSL) on the following services:

  • Microsoft Download Service (MSDL)

          Dial (206) 936-6735 to connect to MSDL
          Download TIMESMP.EXE (size: 20818 bytes) 
    
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the \SOFTLIB\MSLFILES directory
          Get TIMESMP.EXE (size: 20818 bytes) 
    

MORE INFORMATION

The timer services provided by Multimedia Windows allow an application to schedule timed periodic interrupts or one-time interrupt events at a higher resolution than is available through the standard Windows timer services.

Unlike the Windows timer services, the Multimedia timer services are interrupt-based. Rather than posting WM_TIMER messages to a message queue, the Multimedia service calls a specified function at interrupt time. Because the callback code is accessed at interrupt time, it must adhere to strict programming guidelines. In particular, only a very limited set of system function calls may be made, and the callback function must reside in a fixed-code dynamic-link library (DLL).

The Multimedia timer services are useful for applications that demand high-resolution timing, such as a MIDI sequencer. For less demanding synchronization tasks, use the SetTimer function provided by Windows.

The sample application TIMESMP demonstrates using the timer services and a callback function residing in a fixed code DLL.


Additional reference words: 3.00 softlib TIMESMP.EXE
KBCategory: kbmm kbprg kbfile
KBSubcategory: MMTimer


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 15, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.