Sign in to follow this  
dpadam450

Timers (advanced question, not beginner)

Recommended Posts

dpadam450    2357
I'm using windows functions: QueryPerformance... QueryPerformanceFreq() in DevC++ returns 3.5 e6 (3.5 Ghz which I'm on AMD 3500+) QueryPerformanceFreq() in VS2005 returns 7.0e+010 Acutally after copying this its strange that they are very very close to a 2.0 multiplier. (I didnt show every digit thats why im saying close). Maybe because its running in debug? I couldnt get release mode to work cuz of a library issue. I'm going to try to get that up and see.

Share this post


Link to post
Share on other sites
Sc4Freak    643
The AMD 3500+ doesn't run at 3.5ghz. It runs at 2.2ghz. That, and 3.5e6 is actually 3.5 million (which would, by your metric, be 3.6mhz) and not 3.5 billion. Also, the difference between 3.5e6 and 7.0e10 is a lot more than 2x. It's more like 4 orders of magnitude.

Besides, it shouldn't matter. The results of QueryPerformanceFreq() should only really be used in conjunction with the results from QueryPerformanceCounter(), so the timer results will be consistent either way.

Share this post


Link to post
Share on other sites
dpadam450    2357
Well your right in the math logic.

The thing is, DevC++, my particles work correctly I took the final time in seconds and multiplied by the framerate given from Fraps, and I got 1.

In MSoft, uhm my particles move like a hair each frame and I think its cuz that 7.blah e10 is so damn big.

Share this post


Link to post
Share on other sites
dpadam450    2357
Its not my code, how can there be a bug. I call a windows function and it gives me that number.


Anyway, you're supposed to use the ".QuadPart" right? I mean like i said, this all works in DevC++.

LARGE_INTEGER freq;

freq = 9813606787
freq.QuadPart = 10311586962
freq.HighPart = 2
freq.LowPart = 2092886133

Should I just use a different timer method all together?

Share this post


Link to post
Share on other sites
dpadam450    2357
It got solved. Sent it to a friend. Really weird how he fixed it though. Didn't make sense.

As for the Scuppy guy, I figured someone would think I'm saying that in an amateur way, but what I meant was this way: If I call a void function taking void as the paramter and it returns 455, but its returning -1, then I have no damn effect on that function. And if it is said to be an algorithm and work all the time, then its not a bug, its some other b/s happening somewhere.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this