home ‣ Accurate timers on Windows
| 31 Dec 2005 · Tags: win32, programming | ← newer • 207 of 588 • older → |
From this blog post on using accurate timers on Windows.
CraeteWaitableTimer API is similar to SetTimer. You can specify timeout and a callback function. It has the following advantages:
- you can specify a delay
- it returns a kernel handle you can wait on
- it allows pasing context data pointer to a callback function
- waitable timers are much more accurate as they are not calculated during idle and messages aren't collapsed
- you can adjust the parameters of the timer with SetWaitableTimer and cancel it with CancelWaitableTimer..
blog comments powered by Disqus