Click here to Skip to main content
15,922,584 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: calculate elapsed time Pin
George_George19-Jan-07 0:50
George_George19-Jan-07 0:50 
GeneralRe: calculate elapsed time Pin
Roger Stoltz19-Jan-07 1:53
Roger Stoltz19-Jan-07 1:53 
GeneralRe: calculate elapsed time Pin
George_George19-Jan-07 2:11
George_George19-Jan-07 2:11 
GeneralRe: calculate elapsed time Pin
Roger Stoltz19-Jan-07 2:22
Roger Stoltz19-Jan-07 2:22 
GeneralRe: calculate elapsed time Pin
George_George19-Jan-07 22:47
George_George19-Jan-07 22:47 
GeneralRe: calculate elapsed time Pin
Mark Salsbery20-Jan-07 6:14
Mark Salsbery20-Jan-07 6:14 
GeneralRe: calculate elapsed time Pin
George_George20-Jan-07 21:23
George_George20-Jan-07 21:23 
GeneralRe: calculate elapsed time Pin
Mark Salsbery21-Jan-07 7:26
Mark Salsbery21-Jan-07 7:26 
the performance counter is NOT a periodic timer. It's like get tick count with much better
resolution. On my 3.2GHz box it's incremented on every clock tick (3.2GHz frequency).

You could use GetTickCount if 10ms-55ms accuracy is good enough.

Get the count, run the function, get the count again. Subtract and you have your elapsed time.
Factor in the frequency to convert to seconds, milliseconds, nanoseconds, whatever.

Mark
GeneralRe: calculate elapsed time Pin
George_George21-Jan-07 17:45
George_George21-Jan-07 17:45 
GeneralRe: calculate elapsed time Pin
Mark Salsbery22-Jan-07 6:16
Mark Salsbery22-Jan-07 6:16 
GeneralRe: calculate elapsed time Pin
George_George22-Jan-07 22:53
George_George22-Jan-07 22:53 
QuestionHow to check Printer connectivity? Pin
birajendu18-Jan-07 20:21
birajendu18-Jan-07 20:21 
QuestionHow to change colour through space bar of a drawn object in windows programming Pin
cshah218-Jan-07 20:11
cshah218-Jan-07 20:11 
QuestionRe: How to change colour through space bar of a drawn object in windows programming Pin
prasad_som18-Jan-07 20:21
prasad_som18-Jan-07 20:21 
AnswerRe: How to change colour through space bar of a drawn object in windows programming Pin
cshah218-Jan-07 20:31
cshah218-Jan-07 20:31 
AnswerRe: How to change colour through space bar of a drawn object in windows programming Pin
Hamid_RT18-Jan-07 20:27
Hamid_RT18-Jan-07 20:27 
GeneralRe: How to change colour through space bar of a drawn object in windows programming Pin
cshah218-Jan-07 20:31
cshah218-Jan-07 20:31 
GeneralRe: How to change colour through space bar of a drawn object in windows programming Pin
nutkase18-Jan-07 21:28
nutkase18-Jan-07 21:28 
GeneralRe: How to change colour through space bar of a drawn object in windows programming Pin
cshah218-Jan-07 22:01
cshah218-Jan-07 22:01 
GeneralRe: How to change colour through space bar of a drawn object in windows programming Pin
jhwurmbach18-Jan-07 23:23
jhwurmbach18-Jan-07 23:23 
Questionto know Service pack version installed Pin
Manasi D18-Jan-07 20:11
Manasi D18-Jan-07 20:11 
AnswerRe: to know Service pack version installed Pin
Michael Dunn18-Jan-07 20:39
sitebuilderMichael Dunn18-Jan-07 20:39 
QuestionMemory Leak please help Pin
uday kiran janaswamy18-Jan-07 19:47
uday kiran janaswamy18-Jan-07 19:47 
QuestionRe: Memory Leak please help Pin
prasad_som18-Jan-07 20:07
prasad_som18-Jan-07 20:07 
AnswerRe: Memory Leak please help Pin
uday kiran janaswamy18-Jan-07 20:14
uday kiran janaswamy18-Jan-07 20:14 

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.