Original Post
Hello there,
I am trying to find the clock speed of the processor. I use the clock () (time.h) function to let a second elapse, then subtract the values returned thru RDTSC instruction (in assembly) invoked before and after the time interval to find the clocks elapsed. Then I divide this by 1,000,000 to find the clock speed in Mhz. My processor is running at 400Mhz and this program gives values from 397.xxx to 401.xxx. Reasonably accurate.
I would like to know how clock () is implemented so that I can get a more accurate value.
If you like to see source/exe of my program, please visit:
http://www.poojyum.com/jlog/
Thanks.
jaggu