Take the 2-minute tour ×

Why should I use the SetTimer function instead of multimedia timer services for applications that do not use high-resolution timing?

According to the offical documentation that's what I should do, with no reason given as to why.

share|improve this question
Function depends on the goal that I want to achieve. You are not giving enough details. –  Kirill Kobelev Jun 18 '13 at 2:08
Imagine if everything demanded high-resolution timers when low-resolution ones would suffice. –  jamesdlin Jun 18 '13 at 2:22
add comment

2 Answers

up vote 3 down vote accepted

Higher-resolution timing is less efficient. The OS needs to keep track of time more accurately, and it may need to suspend other threads at inefficient times to get your timer called on time. So basically, high resolution timers are expensive, and you should only use expensive things when you need to.

share|improve this answer
add comment

In addition to Brendan's point, with SetTimer you get a Windows message that fits directly into the architecture of a GUI program, with no interthread communication required. With the multimedia timers, you get a callback on a system thread, which is awkward to integrate and synchronize with the code running on your thread(s).

share|improve this answer
add comment

Your Answer


