Re: PC timer



Dirk Bruere at Neopax wrote:
> On a modern PC what is the best resolution I can get from reading the clock?
> I need to timestamp data packets.
> Ideally I need sub millisecond res.

You can probably get that - tcpdump (well, windump) reports packet
times in microseconds. All the digits change but no idea what the
increment or accuracy actually is.

The old 8253 chip in the PC is clocked at 4.77 mhz / 4 or 1.193 MHz
giving a theoretical resolution of a bit less than a microsecond (or
perhaps half that rate, depending on the minimum count), if you either
reprogram the interrupt to happen that fast or figure out how to read
out the running count. Usually the interrupt was at the maximum 16 bit
divisor of that - 18.2 Hz, but many programs sped it up.

There may be other clocks in more modern designs?

.



Relevant Pages

  • Re: [PATCH] ktimers subsystem 2.6.14-rc2-kt5
    ... > a clock with a better resolution. ... > resolution than the physical clock has. ... reaches this count the timer is expired. ... OTOH We could also do this at the timer interrupt: ...
    (Linux-Kernel)
  • Re: PC timer
    ... > On a modern PC what is the best resolution I can get from reading the clock? ... Older PCs have the system timer chip which can be read with ...
    (sci.electronics.design)
  • Re: [patch 00/21] hrtimer - High-resolution timer subsystem
    ... Right now the primary function of the state is to tell whether the timer ... > Of course if you consider the possibility of including high resolution ... problem requires solving problems in the clock abstraction first, ...
    (Linux-Kernel)
  • Re: Need to implement a calendar clock with millisecond resolution, please help.
    ... true, as I am a newbie, not even a real programmer), but I need to ... implement a calendar time clock with a millisecond resolution. ... system include clock, delay(), gettimeofday, msleep, ...
    (comp.lang.c)
  • Re: Q about noise in time interval measurement averging
    ... I have a PIC measuring a time interval to 25ns resolution, ... I cant seem to recall how the noise reduces with increasing samples, ... your need to know the sense of the rotation as well as it's speed. ... My own inclination would be to go for a faster clock - using ...
    (sci.electronics.design)