Re: [hackers] [sbase][PATCH] Improvements to sleep(1):

From: Laslo Hunhold <dev_AT_frign.de>
Date: Mon, 2 Jan 2017 21:26:58 +0100

On Tue, 27 Dec 2016 15:45:00 +0100
Mattias Andrée <maandree_AT_kth.se> wrote:

Hey Mattias,

> I have withdrawn this proposal.
>
> But the idea of having multiple arguments is that you
> can write for example “1h 30m”, of course, this is not
> important is you can just as well write “90m”, and in
> case where the calculations are that simple you can
> use expr(1), but implementing it didn't really complicate
> anything and brings compatibility.

thanks for the clarification!

> Waits shorted that 1s is useful in things like rc-scripts
> that need to wait for a short period. And longer waits
> are useful in cases like if you are setting up a simple
> alarm if you want to take a short rest, or if you have
> a lot of things running in different terminals (because
> you want to see the output of each) but you don't want
> all of the to run a the same time.

yes this makes sense. The question is if we really want the added
complexity. It's a trade-off which needs to be worth it.
The multiple arguments + time-suffixes look quite elegant and useful,
however, maybe we need to derivate strtonum to allow "retrieving" the
end-pointer to make the code even simpler.

Cheers

Laslo

-- 
Laslo Hunhold <dev_AT_frign.de>
Received on Mon Jan 02 2017 - 21:26:58 CET

This archive was generated by hypermail 2.3.0 : Mon Jan 02 2017 - 21:36:15 CET