Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 8 Mar 2002 14:05:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 8 Mar 2002 14:05:19 -0500 Received: from lightning.swansea.linux.org.uk ([194.168.151.1]:20239 "EHLO the-village.bc.nu") by vger.kernel.org with ESMTP id ; Fri, 8 Mar 2002 14:05:03 -0500 Subject: Re: gettimeofday() system call timing curiosity To: root@chaos.analogic.com Date: Fri, 8 Mar 2002 19:19:55 +0000 (GMT) Cc: lk@tantalophile.demon.co.uk (Jamie Lokier), hpa@zytor.com (H. Peter Anvin), linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk (Alan Cox), terje.eggestad@scali.com (Terje Eggestad), greearb@candelatech.com (Ben Greear), davidel@xmailserver.org (Davide Libenzi), george@mvista.com (george anzinger) In-Reply-To: from "Richard B. Johnson" at Mar 08, 2002 01:54:16 PM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: From: Alan Cox Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > 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/