[buug] How to get the CPU frequency

Nick Sophinos nickmdf at tsoft.com
Sat Feb 8 08:54:51 PST 2003

One way is to `cat /proc/cpuinfo` and then parse the value out of 
that. I suspect there is a better way, though.

- nick

-----Original Message-----
From: buug-admin at weak.org [mailto:buug-admin at weak.org]On Behalf Of Abhay
Kumar Srivastava
Sent: Saturday, February 08, 2003 3:15 AM
To: buug at weak.org
Subject: [buug] How to get the CPU frequency

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


Buug mailing list
Buug at weak.org

More information about the buug mailing list