Performance Monitor Counters

If many timers were created with very short intervals, the system could be completely paralyzed, except for servicing timer events. Windows prevents this by making sure that only one WM_TIMER message will ever exist in a thread's message queue at any given time.

Also, a WM_TIMER message is synthesized by the system only if the queue has no outstanding messages to process. Thus, all other messages are prioritized over WM_TIMER messages. The lone exception is the WM_PAINT message, which even defers to the timer messages.

In most applications the absence of timers firing will not cause a serious problem. If more serious time measurement is called for, however, there is an alternative: performance monitor counters. Performance ...

Get Microsoft Windows 2000 API SuperBible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.