coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] sleep: allow ms suffix for milliseconds


From: Kaz Kylheku (Coreutils)
Subject: Re: [PATCH] sleep: allow ms suffix for milliseconds
Date: Fri, 29 Nov 2019 08:25:42 -0800
User-agent: Roundcube Webmail/0.9.2

On 2019-11-29 05:30, Rasmus Villemoes wrote:
* src/sleep.c: Accept ms suffix.
* doc/coreutils.texi (sleep invocation): Document it.

When one wants to sleep for some number of milliseconds, one can
do (at least in bash)

  sleep $(printf '%d.%03d' $((x/1000)) $((x%1000)))

but that's a bit cumbersome. Extend sleep(1) to also accept "ms" as a
suffix, so one can instead do

  sleep ${x}ms

Could be worth it to accept a few other suffixes like "us" and "ns".




reply via email to

[Prev in Thread] Current Thread [Next in Thread]