Re: timer question

From: Richard B. Johnson (root_at_chaos.analogic.com)
Date: 03/31/04

  • Next message: Stephens Tim-MGI1634: "Why does serial.c not allow you to share the serial console port interrupt?"
    Date:	Wed, 31 Mar 2004 16:31:29 -0500 (EST)
    To: Chuck Lever <cel@citi.umich.edu>
    
    

    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,
    *** 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/


  • Next message: Stephens Tim-MGI1634: "Why does serial.c not allow you to share the serial console port interrupt?"