Tech Support > Microsoft Windows > Development Resources > How to measure time?
How to measure time?
Posted by Wilfried Holzke on December 17th, 2003


Hi,

I am writing an application which manipulates images within a thread. I want to
calculate the frames per second. What is the best and precisely procedure to
calculate the fps?

Thanks for help.

regards

Wilfried

Posted by Marco Era on December 17th, 2003


I suggest you use a high resoultion timer.
Follow this link:
http://msdn.microsoft.com/library/de...ncecounter.asp

Regards,
Marco Era
http://www.marcoera.com



Posted by Wilfried Holzke on December 17th, 2003


Hi


Thanks for the information, but the MS-page tells me that the topic can not be
found. But I think you mean the "queryperformancecounter" procedure?

Grüße

Wilfried


Posted by Jugoslav Dujic on December 17th, 2003


Wilfried Holzke wrote:
| Hi
|
| >>I am writing an application which manipulates images within a thread. I
| > want to
| >>calculate the frames per second. What is the best and precisely procedure
| > to
| >>calculate the fps?
|
| > I suggest you use a high resoultion timer.
| > Follow this link:
| >
|
http://msdn.microsoft.com/library/de...sinfo/base/que
ryperformancecounter.asp
| Thanks for the information, but the MS-page tells me that the topic can not be
| found. But I think you mean the "queryperformancecounter" procedure?

Yes. Marco's link is missing a hyphen in "enus" part -- should be "en-us".

--
Jugoslav
___________
www.geocities.com/jdujic

Posted by Marco Era on December 18th, 2003


Sorry about that, I lost the hyphen in my copy & paste... :-)
We should have in Windows a multiple clipboard as Office has, shouldn't we ?

Regards,
Marco Era
http://www.marcoera.com



Posted by Wilfried Holzke on December 18th, 2003


Hi,

Is the QueryHighPerformanceCounter the best solution or are there other
procedure for time measuring?

regards

Wilfried


Posted by Marco Era on December 18th, 2003


You could use a multimedia timer, but it hasn't the same resolution as
QueryPerformanceCounter.

That's why I use a high-resolution timer in this app:
http://www.marcoera.com/articles.htm

Anyway, multimedia timer documentation is here:
http://msdn.microsoft.com/library/en...asp?frame=true

Regards,
Marco Era
http://www.marcoera.com




Similar Posts