In doing recent high accuracy timings, I've found that the Windows API call, QueryPerformanceFrequency, returns a constant nominal processor frequency. Under ideal conditions, this would be great. Unfortunately, we don't live in an ideal world, let alone ideal conditions, given most circumstances. I guess the clocks that feed the processors are notorious for having skewed frequencies, depending on the heat generated from the varying load on the processor. Due to this, QueryPerformanceFrequency returns a constant locked in frequency that should be the most accurate frequency under nominal conditions, and is the best approximation of the clock frequency over a long duration. When performing any sort of high accuracy timing within short time periods, this can be quite a factor!
Wednesday, August 27, 2008
Subscribe to:
Post Comments (Atom)
1 comment:
although not closely related, this is similar to how MSIE (mis)calculates time left for a download to be completed. Before you accept to save a file to a target destination, explorer starts saving it to a temporary file. When you click to save the download to your target destination, IE starts its timer. So at t=0 IE will show less than 10 seconds left for the download to be completed. Since it has already downloaded a section of the file, X kb / 0 s = +inf kbps ; granted file size X > 0.
A great way for scum bags to upload trojans,key loggers, etc. before you even accept a connection.
Once again we thank you MS.
Note: This information may not be relevant anymore since I have stopped using IE several years ago.
Post a Comment