Andi Kleen | 10 Apr 17:35
Gravatar

Re: gettimeofday() resolution in Linux?

lsorense <at> csclub.uwaterloo.ca (Lennart Sorensen) writes:
>
> On many systems gettimeofday uses the TSC, but on many multicore systems
> the TSC on each core may be out of sync, in which case the cpu you are
> running on may give a different gettimeofday result than another cpu,
> which is probably a bad thing for some processes.

In this case Linux falls back to other timers which are slower and 
less accurate.

jiffies based gettimeofday is theoretically possible, but near
never used.

-Andi

Gmane