Click here to Skip to main content
15,919,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: preemption for 16ms Pin
Nir sheffi24-May-07 1:57
Nir sheffi24-May-07 1:57 
GeneralRe: preemption for 16ms Pin
CPallini24-May-07 2:14
mveCPallini24-May-07 2:14 
GeneralRe: preemption for 16ms Pin
Nir sheffi24-May-07 2:45
Nir sheffi24-May-07 2:45 
GeneralRe: preemption for 16ms Pin
Roger Stoltz24-May-07 2:20
Roger Stoltz24-May-07 2:20 
AnswerRe: preemption for 16ms Pin
Randor 24-May-07 3:28
professional Randor 24-May-07 3:28 
GeneralRe: preemption for 16ms Pin
Roger Stoltz24-May-07 4:24
Roger Stoltz24-May-07 4:24 
GeneralRe: preemption for 16ms Pin
Randor 24-May-07 10:33
professional Randor 24-May-07 10:33 
GeneralRe: preemption for 16ms Pin
Roger Stoltz24-May-07 21:04
Roger Stoltz24-May-07 21:04 
Hi David,


Randor wrote:
According to the MSDN the timeBeginPeriod API call affects the Sleep() quantum and all timers associated with the application.


Yes, I saw that in the link you provided.
However, I think it's wrong, or at least misguiding. The section about timeBeginPeriod() has been added at much later date. It doesn't exist in my MSDN release from July 2001, nor does the documentation about ::timeBeginPeriod() mention this. The fact that the ::timeXXXX() functions are part of the multimedia timer library winmm.lib and ::Sleep() is not, also implies to me that the current MSDN documentation is erroneous.

Even if the MSDN documentation is correct and calling ::timeBeginPeriod() would change the resolution of ::Sleep(), there would be no point in doing it because of the way ::Sleep() works. The calling thread enter a busy wait state and if the thread is preempted it probably won't run until a time ridiculously greater than the resolution set with ::timeBeginPeriod().


Randor wrote:
The author of the question will certainly get best performance by utilizing multi-media timers.


Absolutely.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown

GeneralRe: preemption for 16ms Pin
Randor 25-May-07 4:27
professional Randor 25-May-07 4:27 
GeneralRe: preemption for 16ms Pin
Roger Stoltz27-May-07 12:16
Roger Stoltz27-May-07 12:16 
QuestionAnyone know how I can install this addin? Pin
Stick^24-May-07 1:23
Stick^24-May-07 1:23 
AnswerRe: Anyone know how I can install this addin? Pin
David Crow24-May-07 3:12
David Crow24-May-07 3:12 
Questionlstrlen problem Pin
si_6924-May-07 0:36
si_6924-May-07 0:36 
AnswerRe: lstrlen problem Pin
James R. Twine24-May-07 0:49
James R. Twine24-May-07 0:49 
GeneralRe: lstrlen problem Pin
si_6924-May-07 0:52
si_6924-May-07 0:52 
GeneralRe: lstrlen problem Pin
James R. Twine24-May-07 1:00
James R. Twine24-May-07 1:00 
GeneralRe: lstrlen problem Pin
Naveen24-May-07 1:01
Naveen24-May-07 1:01 
QuestionIs my approach feasible? C++ Pin
C_Zealot24-May-07 0:26
C_Zealot24-May-07 0:26 
AnswerRe: Is my approach feasible? C++ Pin
Christian Graus24-May-07 0:50
protectorChristian Graus24-May-07 0:50 
AnswerRe: Is my approach feasible? C++ Pin
James R. Twine24-May-07 0:51
James R. Twine24-May-07 0:51 
GeneralRe: Is my approach feasible? C++ Pin
C_Zealot24-May-07 0:52
C_Zealot24-May-07 0:52 
GeneralRe: Is my approach feasible? C++ Pin
James R. Twine24-May-07 0:57
James R. Twine24-May-07 0:57 
GeneralRe: Is my approach feasible? C++ Pin
C_Zealot24-May-07 1:24
C_Zealot24-May-07 1:24 
GeneralRe: Is my approach feasible? C++ Pin
James R. Twine24-May-07 2:12
James R. Twine24-May-07 2:12 
GeneralRe: Is my approach feasible? C++ Pin
David Crow24-May-07 3:49
David Crow24-May-07 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.