Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » QueryPerformanceTimer and gettimeofday

This thread is locked; no one can reply to it. rss feed Print
QueryPerformanceTimer and gettimeofday
Goodbytes
Member #448
June 2000
avatar

The above functions are said to be the best ways to get accurate, high-resolution time from a program.

I've looked up gettimeofday in a C reference, and I understand how it works. However, I've tried searching google and the MSDN for information on QueryPerformanceTimer and I have not found anything useful.

I'm sorry if this is blatantly obvious, then, but how do I use QueryPerformanceTimer? And does QueryPerformanceFrequency (I think I saw that somewhere) also have a useful purpose for hi-res timing?

Finally, is there a platform other than Windows where I would be better off using an Allegro or other timer than gettimeofday?

Thanks a lot.


--
~Goodbytes

23yrold3yrold
Member #1,134
March 2001
avatar

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Thomas Fjellstrom
Member #476
June 2000
avatar

But GameDev is "them", GameDev is "they", GameDev is the other guy...

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

23yrold3yrold
Member #1,134
March 2001
avatar

And when the other guy has what you want, you go there. GameDev's article section is a wonderous treasure trove of bounty and stuff.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Goodbytes
Member #448
June 2000
avatar

Hmm... slightly confusing, but I think I'll work it out. Thanks, Chris.

(Meaningful glance at Thomas) ;D


--
~Goodbytes

Thomas Fjellstrom
Member #476
June 2000
avatar

It's an oppinion that your fact it wrong.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

It's an oppinion that your fact it wrong.

Your opinion is (spelt) wrong!

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Thomas Fjellstrom
Member #476
June 2000
avatar

Its fact that I couldn't care less :P

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Go to: