What’s the difference between CreateTimerQueueTimer and SetThreadpoolTimer?

Raymond Chen

A customer wanted to know what the difference is between CreateTimerQueueTimer and SetThreadpoolTimer, and what factors they should consider when choosing between them. (The customer explained that their immediate need was to create a periodic timer that fires every five seconds. It is not critical that the timer fire exactly at five second intervals.)

The CreateTimerQueueTimer function is a wrapper that calls SetThreadpoolTimer under the covers, so at the end of the day, you’re using SetThreadpoolTimer whether you like it or not.

The CreateTimerQueueTimer function is just a compatibility function for programs written to the old thread pool API.

The customer thanked us for the explanation and decided to go with SetThreadpoolTimer.

0 comments

Discussion is closed.

Feedback usabilla icon