Good evening. Recently I've been using rdtsc to do timings in my programs. I have a function that correcctly determins the speed of the CPU, so I can convert the differences in the time stamps to seconds. However, if a computer (likely a laptop) happens to step down to a lower speed, I would need to recalculate the CPU speed to keep the conversion to seconds correct. I heard the processor does this itself, not the OS telling it to, is this true? Is there any way for me to tell if the processor decided to step down; flags or windows messages perhaps? I checked the board and msdn with no luck, any help is appreciated as always. Thanks.
Posted on 2002-10-05 02:27:22 by AlexEiffel
Well, why not create some thread (it's not complicated at all, I thought it was hard but it isn't; a simple invoke and a extra thread is running) that does a rdtsc syncronization at an specified time interval, eg once every 3rd second.
Have you tried the technical docs for the CPU?
Posted on 2002-10-05 07:13:29 by scientica