[buug] How to get the CPU frequency

Abhay Kumar Srivastava abhay_srivastava at infosys.com
Sat Feb 8 03:14:42 PST 2003


Hi,
I need to get the CPU frequency programmatically, how do I do that?
printf("%d\n",sysconf(_SC_CLK_TCK));
printf("%d\n", CLOCKS_PER_SEC);
does not help, they  show the same value (128) on different machines
with different CPU speed.

Regards,
Abhay




More information about the buug mailing list