Link to home
Start Free TrialLog in
Avatar of pebler
pebler

asked on

High Performance Counter roll-over

When does the Pentium class CPU high-performance counter roll-over? QueryPerformanceCounter() returns the count in a LONGLONG, but how high does it actually get before it wraps around to zero?
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nietod
nietod

Why the bad grade?  If you don't like and answer or if it is incomplete, you can ask for additional details instead of giving a bad grade.  But I don't think there are additional details to give in this case....
Avatar of pebler

ASKER

Didn't I give it a "good"?
I suppose I should have rather asked "how many bits is used by the counter?"
Even a 64-bit counter at 1000MHz would only count for 5.85 centuries, not thousands. The counters do only go at around 1Mhz, and 585000 years certainly is long enough, but if the counter was say 48-bits, you're down to 9 years. Also good enough of course, but if for some really odd reason fewer bits are used, you start getting into reasonable amounts of time. Even though your numbers were off (unless it's actually more than 64 bits?) I took your answer to mean 64-bit or at least 48-bit.
You're right that I should have asked for more details before accepting the answer. This is only the second question I've asked here, and I wasn't really thinking about how it would affect your points, or rating or whatever. Sorry about that.
The counter is 64 bits.   When I did the math I got thoundands of centuries.

I did it again and I got 5.85 centuries too.  I probably did 1000Hz, not 1000Mhz.   Since it is hard to keep a windows computer running for a day without a crash, that should be sufficient though.

>>  I wasn't really thinking about how it
>> would affect your points
It gets permenantly recorded in our record and I don't like to see many C's.  So please be more careful in the future.  (If an answer deserves a C, that is different, but usually that just means you need to "talk" to the expert som more.)