Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262574AbUCaVdi (ORCPT ); Wed, 31 Mar 2004 16:33:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262561AbUCaVcw (ORCPT ); Wed, 31 Mar 2004 16:32:52 -0500 Received: from chaos.analogic.com ([204.178.40.224]:10885 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S262574AbUCaVaF (ORCPT ); Wed, 31 Mar 2004 16:30:05 -0500 Date: Wed, 31 Mar 2004 16:31:29 -0500 (EST) From: "Richard B. Johnson" X-X-Sender: root@chaos Reply-To: root@chaos.analogic.com To: Chuck Lever cc: Linux Kernel Mailing List Subject: Re: timer question In-Reply-To: Message-ID: References: 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: 1002 Lines: 31 On Wed, 31 Mar 2004, Chuck Lever wrote: > hi all- > > i'm looking for a way to do microsecond resolution timing in the RPC > client. i need a timer or timestamp function that is fairly cheap, that i > can call on any hardware platform, and that i can invoke from inside a > bottom half. > > any suggestions? > > - Chuck Lever If you find one, we'd all like to use it! The Intel machines, after the i486, have the rdtsc instruction which will return the number of CPU clocks that have occurred since the chip was turned ON. It can be calibrated upon startup so you know how many clocks occur in a second. Cheers, Dick Johnson Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips). Note 96.31% of all statistics are fiction. - 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/