Solved

High Performance Counter roll-over

Posted on 2000-03-21
4
517 Views
Last Modified: 2013-12-03
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?
0
Comment
Question by:pebler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 200 total points
ID: 2642878
You'll won't live to see it!

Even if the performance counter ticks off CPU cycles on a 1000MHz machine the counter (and it isn't that accurate)  it can still count for thousands of centuries.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2644331
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....
0
 

Author Comment

by:pebler
ID: 2645655
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.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2645926
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.)
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question