From: Paul Kelly (longword at domain esatclear.ie)
Date: Thu 24 May 2001 - 20:08:15 IST
Anthony Harrington wrote:
> Can anyone tell me a system call for measuring time in nano-seconds ?
I don't believe there is one. The overhead of a syscall will affect your
timing anyway. Your best bet is probably the TSC - a CPU register on
i586 class CPUs. It's a counter increments every clock cycle, so the
resolution - and the answer you get from it - depends on the clock speed
of the CPU. Have a look in the source of UAE for an example of how to
Not what you'd call portable, but it gets the job done.
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:10:27 GMT