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


Groups > gnu.bash.bug > #14510 > unrolled thread

Re: Add sleep builtin

Started byJaren Stangret <sirjaren@gmail.com>
First post2018-08-19 13:51 -0500
Last post2018-08-19 13:51 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Add sleep builtin Jaren Stangret <sirjaren@gmail.com> - 2018-08-19 13:51 -0500

#14510 — Re: Add sleep builtin

FromJaren Stangret <sirjaren@gmail.com>
Date2018-08-19 13:51 -0500
SubjectRe: Add sleep builtin
Message-ID<mailman.5299.1534704722.1292.bug-bash@gnu.org>
Additionally, for simple uses, using:
read -t<floating point>

Works for pseudo built-in sleep. Not easy to use in subshells, or with any
forks.

On Sun, Aug 19, 2018, 12:12 PM konsolebox <konsolebox@gmail.com> wrote:

> 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
>
>

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web