Re: [PATCH v2] tools/nolibc: Implement msleep()

From: Mark Brown
Date: Wed May 12 2021 - 08:19:40 EST


On Wed, May 12, 2021 at 01:59:49PM +0200, Willy Tarreau wrote:
> On Wed, May 12, 2021 at 12:47:28PM +0100, Mark Brown wrote:

> > - Return the number of seconds remaining if the delay does not
> > complete.

> But why returning the number of seconds instead of milliseconds ?
> The common use case is this:

> delay = delay_before_next_event();
> while ((ret = msleep(delay)) > 0)
> delay -= ret;

It seemed to be what you were asking for and I didn't have strong enough
opinions for it to be worth pushing back.

Attachment: signature.asc
Description: PGP signature