Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Bad sleep time resolution of nanosleep(2)
rhialto%falu.nl@localhost (Rhialto) writes:
>I tried it on some fairly idle machines, and the result was quite
>consistent. It really looks like there is something in there that
>inadvertently always causes an extra tick delay.
tick
- some nanoseconds later
- you wake up
- you sleep for at least one tick
tick
- not enough yet because the first interval was
a few nanoseconds too short
tick
- some nanoseconds or microseconds later
- you wake up
...
N.B. nanosleep shouldn't be based on ticks.
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index