thx a lot.... Where i can find more information about iirc and when it is used in comparison with the tick rate? My question arrised when i was trying to see if i can reach a time accuracy below 1ms in my linux box.... NTP uses IIRC or the tick rate? Thx a lot Quoting Neil Horman <nhorman@xxxxxxxxxx>: > apalaios@xxxxxxxxxxxx wrote: > > Hi...yesterday i was reading the understanding linux kernel and the linux > kernel > > development. I have found that at boot time the kernel programmes the irq0 > to a > > tick rate of 1 ms for 2.6 linux kernel and 10ms for 2.4 kernel... > > > > Also the articles that i have read said that the kernel updates the system > clock > > each 1 msec. I was wondering then how the kernel is possible to keep > > microsecond timestamps for the packets coming in an interface? How can > calulate > > the time when the basic timer is only at 1 millisecond? > > I have also read for the > > > > struct timespec { > > time_t tv_sec; /* seconds */ > > long tv_nsec; /* nanoseconds */ > > }; > > > > timespec struct that has a nanosecond field.. How the kernel can insert > data to > > that field and how it can calculate the nanoseconds have passed?? > > Thx..as u can understand i am very confused about time related issues...so > plz > > shed as much ligh as u can.. > > Thx a lot Alex Paleos > > > > ---------------------------------------------------------------- > > This message was sent through the TEI of ATHENS by means of NOC. > > - > > : send the line "unsubscribe linux-net" in > > the body of a message to majordomo@xxxxxxxxxxxxxxx > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > IIRC Most arches have a free running counter that has nanosecond > granularity. You just read it when a packet arrives and can use that to > calculate very small amounts of time. > > Neil > -- > /*************************************************** > *Neil Horman > *Software Engineer > *Red Hat, Inc. > *nhorman@xxxxxxxxxx > *gpg keyid: 1024D / 0x92A74FA1 > *http://pgp.mit.edu > ***************************************************/ > ---------------------------------------------------------------- This message was sent through the TEI of ATHENS by means of NOC. - : send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html