Re: gettimeofday() system call timing curiosity

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Fri Mar 08 2002 - 14:19:55 EST


> The following program clearly shows that Linux will not return the
> same gettimeofday values twice in succession. Since it provably takes
> less than 1 microsecond to make a system call on a modern machine,

We don't wait. Your computer just sucks 8)

More seriously even on a processor with a TSC we have to take a lock and
do several computations.

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 15 2002 - 22:00:09 EST