Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14507

Re: Add sleep builtin

From konsolebox <konsolebox@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Add sleep builtin
Date 2018-08-20 01:12 +0800
Message-ID <mailman.5294.1534698764.1292.bug-bash@gnu.org> (permalink)
References <CAJnmqwZ1GUZRtGRHt8xy_-tdTjVsAQKt-toGAEn5e9gjFrR0vQ@mail.gmail.com> <83513822-23BF-4695-9542-F967512A8A3D@gmail.com>

Show all headers | View raw


On Mon, Aug 20, 2018 at 12:26 AM, Clint Hepner <clint.hepner@gmail.com> wrote:
>
>> On Aug 19, 2018, at 10:25 AM, konsolebox <konsolebox@gmail.com> wrote:
>>
>> Hi Chet,
>>
>> The sleep command is often used in loops and using the external sleep
>> is expensive.
>
> Expensive is relative, as the time spent actually sleeping probably dwarfs the startup time.

Forking is expensive, and collectively is hugely expensive. The
external sleep is also yet another child process to manage.

> If not, you probably want to find an alternative to polling anyway.

Sure, that would be for another solution. Meanwhile I have a patch
which adds about 10 lines of significant runtime code to offer.

-- 
konsolebox

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Add sleep builtin konsolebox <konsolebox@gmail.com> - 2018-08-20 01:12 +0800

csiph-web