Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262250AbVC2JZ6 (ORCPT ); Tue, 29 Mar 2005 04:25:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262266AbVC2JZ6 (ORCPT ); Tue, 29 Mar 2005 04:25:58 -0500 Received: from linux01.gwdg.de ([134.76.13.21]:49117 "EHLO linux01.gwdg.de") by vger.kernel.org with ESMTP id S262250AbVC2JZb (ORCPT ); Tue, 29 Mar 2005 04:25:31 -0500 Date: Tue, 29 Mar 2005 11:25:12 +0200 (MEST) From: Jan Engelhardt To: Jesper Juhl cc: Chris Friesen , krishna , Linux Kernel Subject: Re: How to measure time accurately. In-Reply-To: Message-ID: References: <424779F3.5000306@globaledgesoft.com> <4248E282.1000105@nortel.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 698 Lines: 21 >In some cases you can simply count jiffies - depending on how accurate you >need to time things I'd say that often something like this is adequate : These "some cases" exclude this one: If interrupts are disabled, a jiffy might be missed. Take care. If you are on UP and want to measure within - a tick [when using preempt] - kernel space [no preempt] disabled interrupts should usually not be the case. Jan Engelhardt -- No TOFU for me, please. - 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/