Re: clock speed

Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Wed, 11 Jun 1997 14:36:33 +0200 (MET DST)


On Wed, 11 Jun 1997 mcculley@iag.net wrote:
> Is there any way to, from user space, find out the system clock speed?
> That is, reliably and without having to do a nanosleep and watch the
> cycle counter.

Parse /proc/cpuinfo. You can derive an estimation for the CPU clock speed
based on CPU type, stepping and bogomips.

On Linux/m68k, /proc/cpuinfo even gives you that estimation automatically.

Greetings,

Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/m68k on Amiga          http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium