Click here to Skip to main content
15,926,356 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Memo datatype gives error in Recordset Pin
shivditya20-Jun-07 4:51
shivditya20-Jun-07 4:51 
QuestionC++ Timing, Profiler and timers Pin
wings219-Jun-07 5:45
wings219-Jun-07 5:45 
AnswerRe: C++ Timing, Profiler and timers Pin
softwaremonkey19-Jun-07 6:09
softwaremonkey19-Jun-07 6:09 
QuestionRe: C++ Timing, Profiler and timers Pin
wings220-Jun-07 6:30
wings220-Jun-07 6:30 
AnswerRe: C++ Timing, Profiler and timers Pin
Nemanja Trifunovic19-Jun-07 6:11
Nemanja Trifunovic19-Jun-07 6:11 
AnswerRe: C++ Timing, Profiler and timers Pin
David Crow19-Jun-07 6:11
David Crow19-Jun-07 6:11 
AnswerRe: C++ Timing, Profiler and timers Pin
Iain Clarke, Warrior Programmer19-Jun-07 6:21
Iain Clarke, Warrior Programmer19-Jun-07 6:21 
AnswerRe: C++ Timing, Profiler and timers Pin
Force Code19-Jun-07 9:45
Force Code19-Jun-07 9:45 
Nemanja Trifunovic wrote:
No way Windows can deliver that frequency. SetTimer works reasonably well for ranges over half a second, not milliseconds.


Well, not exactly.

I just tested SetTimer, and the minimum increment it works with is 1/100 of a second (not 1/1000). But with increments in multiples of 1/100 of a second it is extremely accurate. Try it out for yourself. Set an interval of 10 (milliseconds) and every WM_TIMER msg, OutputDebugString(GetCurrentTime()). The millisecond output will increment by 10 for at least fifty iterations before being off by one.

An interval less than 10 milliseconds is treated as 10. An interval that is not a multiple of 10 is bumped up to the next multiple of 10.

The docs on SetTimer mention a USER_TIME_MINUMUM but #defining this to 1 didn't seem to matter. The minimum increment was still ten milliseconds. (OS - Win 2000).
GeneralRe: C++ Timing, Profiler and timers Pin
Force Code19-Jun-07 9:53
Force Code19-Jun-07 9:53 
GeneralRe: C++ Timing, Profiler and timers Pin
Mark Salsbery19-Jun-07 10:03
Mark Salsbery19-Jun-07 10:03 
GeneralRe: C++ Timing, Profiler and timers [modified] Pin
Force Code19-Jun-07 10:45
Force Code19-Jun-07 10:45 
GeneralRe: C++ Timing, Profiler and timers Pin
Mark Salsbery19-Jun-07 10:57
Mark Salsbery19-Jun-07 10:57 
GeneralRe: C++ Timing, Profiler and timers Pin
Force Code19-Jun-07 11:06
Force Code19-Jun-07 11:06 
GeneralRe: C++ Timing, Profiler and timers Pin
Mark Salsbery19-Jun-07 11:17
Mark Salsbery19-Jun-07 11:17 
GeneralRe: C++ Timing, Profiler and timers Pin
Force Code19-Jun-07 11:30
Force Code19-Jun-07 11:30 
QuestionSwitching to administrator programmatically Pin
softwaremonkey19-Jun-07 5:39
softwaremonkey19-Jun-07 5:39 
JokeRe: Switching to administrator programmatically Pin
shivditya19-Jun-07 5:50
shivditya19-Jun-07 5:50 
AnswerRe: Switching to administrator programmatically Pin
David Crow19-Jun-07 6:16
David Crow19-Jun-07 6:16 
QuestionGetting version information into a DLL using manually created .rc file Pin
Barry True19-Jun-07 5:20
Barry True19-Jun-07 5:20 
AnswerRe: Getting version information into a DLL using manually created .rc file Pin
Iain Clarke, Warrior Programmer19-Jun-07 6:27
Iain Clarke, Warrior Programmer19-Jun-07 6:27 
GeneralRe: Getting version information into a DLL using manually created .rc file Pin
Barry True19-Jun-07 8:48
Barry True19-Jun-07 8:48 
GeneralRe: Getting version information into a DLL using manually created .rc file Pin
Iain Clarke, Warrior Programmer19-Jun-07 10:59
Iain Clarke, Warrior Programmer19-Jun-07 10:59 
QuestionDebug to detect Memory Leak Pin
krishnakumar7519-Jun-07 5:09
krishnakumar7519-Jun-07 5:09 
QuestionRe: Debug to detect Memory Leak Pin
Mark Salsbery19-Jun-07 6:39
Mark Salsbery19-Jun-07 6:39 
AnswerRe: Debug to detect Memory Leak Pin
krishnakumar7520-Jun-07 5:20
krishnakumar7520-Jun-07 5:20 

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.