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)



On Tue 24 Nov 2015 at 06:54:09 +0000, Michael van Elst wrote:
> N.B. nanosleep shouldn't be based on ticks.

I agree. I found that I get much better precision if I simply subtract
1/HZ seconds from the time I want to sleep, since that always gets added
in practice. But user programs should not need to do that (not need to
find out the value of HZ).

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl    -- 'this bath is too hot.'

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index