TIMERS: Creates, Modifies, and Terminates Application Timers

TIMERS demonstrates how to create and terminate application timers and how to change the rate of an existing timer.

Start the TIMERS application and choose an option from the Timers menu to create a timer that either dispatches a WM_TIMER message to a window procedure or calls a callback timer procedure. You can set the timer to run at one of three speeds: 0.25, 1, or 5 seconds.

Depending on the menu option you selected, TIMERS displays either the number of WM_TIMER messages sent to the window procedure or the number of times the callback procedure was called and beeps with each increment. Both methods call TOOLHELP.DLL timer services to display the number of milliseconds since the start of the application and the start of the current virtual machine (VM). To stop the timer, choose Timer Stopped from the Timers menu.

TIMERS was built and tested under Microsoft(R) Windows(TM) version 3.1.

KEYWORDS: WIN31ONLY; SetTimer; WM_TIMER; callback; Toolhelp; CheckMenuItem; KillTimer; TimerCount; MessageBeep; TextOut; wsprintf;

{ewc navigate.dll, ewbutton, /Bcodeview /T"Click to open or copy files in the timers project." /C"samples}