C program for processor speed
how can i find my processor speed and开发者_如何学Python capacity of RAM using C program
That'd be different in different OS'es. But in many (most/all?) modern Linuxes, it would boil down to reading and parsing /proc/cpuinfo
.
Edit: disclaimer, Linux'y guy googling somewhat randomly, but this link, http://www.bradwich.com/blog/2008/1/9/retrieving-current-cpu-clock-speed-under-windows/ might give some clues on how to do it with Windows.
This is not a C feature that you are looking for, but an operating system feature. Therefore it depends largely on that. Even among unixes there is no common way to this.
精彩评论