On Tue, May 25, 2021 at 10:46:04PM -0000, Michael van Elst wrote:
> bou...@antioche.eu.org (Manuel Bouyer) writes:
> 
> >Another issue could be mstohz() called with a delay too short;
> >mstohz() will round it up to 1 tick.
> 
> 
> #  define mstohz(ms) ((unsigned int)((ms + 0ul) * hz / 1000ul))
> 
> If mstohz() would round up to full ticks, it could actually avoid
> some pitfalls. But it doesn't.

indeed. But in this case the problem will show up with smaller hz, not
larger. So I think we can rule out this case.

-- 
Manuel Bouyer <bou...@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--

Reply via email to