[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210512115949.GA20883@1wt.eu>
Date: Wed, 12 May 2021 13:59:49 +0200
From: Willy Tarreau <w@....eu>
To: Mark Brown <broonie@...nel.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tools/nolibc: Implement msleep()
On Wed, May 12, 2021 at 12:47:28PM +0100, Mark Brown wrote:
> Allow users to implement shorter delays than a full second by implementing
> msleep().
>
> Signed-off-by: Mark Brown <broonie@...nel.org>
> ---
>
> v2:
> - Support delays of more than a second.
> - 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;
Willy
Powered by blists - more mailing lists