For Programmers: Free Programming Magazines  


Home > Archive > VC Language > May 2006 > Re: ¿How can I to get the time of execution of an application?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: ¿How can I to get the time of execution of an application?
Carl Daniel [VC++ MVP]

2006-05-27, 7:05 pm

Carlos Villaseñor M. wrote:
> Hi everybody!
>
> I need to make a benchmark executing a DLL's functions series in a
> "for" cicle, but I need to get the initial y final time and then get
> the difference to make a benchmark. I Tried with "Time of date,
> Now()", but I can't to convert that results in an integer...¿How can
> I do that?


For timing execution of functions, many people use QueryPerformanceCounter
and QueryPerformanceFrequency. That will give you microsecond (or better)
resolution for measuing short intervals.

Look the functions up on MSDN for the parameters.

-cd


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com