Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14510
| Path | csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Jaren Stangret <sirjaren@gmail.com> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: Add sleep builtin |
| Date | Sun, 19 Aug 2018 13:51:47 -0500 |
| Lines | 33 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.5299.1534704722.1292.bug-bash@gnu.org> (permalink) |
| References | <CAJnmqwZ1GUZRtGRHt8xy_-tdTjVsAQKt-toGAEn5e9gjFrR0vQ@mail.gmail.com> <83513822-23BF-4695-9542-F967512A8A3D@gmail.com> <CAJnmqwaw4iQGYY_Yq=kQscWk70bf9bw0RrRUK9nene5QR31UPg@mail.gmail.com> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| X-Trace | usenet.stanford.edu 1534704723 1118 208.118.235.17 (19 Aug 2018 18:52:03 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | Clint Hepner <clint.hepner@gmail.com>, bug-bash@gnu.org |
| To | konsolebox <konsolebox@gmail.com> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kaWRcE4wwDzAlbdyUUprG9yhwwCf+GvLo5daAKVWqKs=; b=WzxWSg9i6KYIM9TeRVaczBEc+VJ11GwIoitKK3G0+jogmJLsoAnouEU7tzxbqYAPRN pnPFKAkolv9Var+VekYGWwe/unyMPA/tZIVKLu5Jqy17zWjklFP9hCoT+RJJS5+xiFm7 fK1m9tR5d24LzsQEnvihideU85gHOLJmU4G4jDYq0Uk5XxysRs7px7upjaZGWqo7Zwil Xr4qiGCPAUPTjAp851odWV43tc67iSCE2F+vvQ/VS79aYubVmBbFLrtuqJjCH41KHfEC 65cVrO5IPO3JDBVwb6SKkRTchqIZ5WnWSmQHwWpCbc31dtjBtiz7xZrsbiqvefqOevfI nfqQ== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kaWRcE4wwDzAlbdyUUprG9yhwwCf+GvLo5daAKVWqKs=; b=bQbu9k1F49FD3FzWpdqjZErtJnM4L/d2zkPNDko5rF0FYRhC0MAlOInxRd/DwV6k6p RCIBIgzZOSbIf8cGd92SrzcgxYpnJJJbjNU/Wli6Zmk62dH2cGdipy7NFlbetlbmXK7z RDlBowWZk9mgU1O/cfMV/Mk1BXOzjPLPODFYvWHcZTrPMRl3rMVLABaYH65/Kud7qxGm DMSlY70f61wEkayBWrAjJtxlKyTzrtYTa3Mp7bmMF4XwvVC+KjXHxDgUZKF6xlAEv6e+ AeQ9co3fJS7Ajxp2fmZ8hsYX3FIoUOJPHHvo7pH1lm2dItNJYtIFsedWA7BosFfGSwqA cisw== |
| X-Gm-Message-State | AOUpUlEL5w8eVx5b4UJLq1ZMj3fnmGCCOybnB2NKp7cFYjEfH6Qdcmx6 qiOyERr7Gb9e7kHrGAU8UTLihSCQyptohnA3lUYDPQ== |
| X-Google-Smtp-Source | AA+uWPyxG3A/D1eygh9DoTVwWJSz6BUCPtn0ThFR1KjiBdx7Ti/3YUDZYz+KSlD1rSu1rGPO3/gKTModeO6HayDwU0s= |
| X-Received | by 2002:a02:3b55:: with SMTP id i21-v6mr38335711jaf.118.1534704718540; Sun, 19 Aug 2018 11:51:58 -0700 (PDT) |
| In-Reply-To | <CAJnmqwaw4iQGYY_Yq=kQscWk70bf9bw0RrRUK9nene5QR31UPg@mail.gmail.com> |
| X-detected-operating-system | by eggs.gnu.org: Genre and OS details not recognized. |
| X-Received-From | 2607:f8b0:4001:c0b::230 |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.21 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash/> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:14510 |
Show key headers only | View raw
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 > >
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Add sleep builtin Jaren Stangret <sirjaren@gmail.com> - 2018-08-19 13:51 -0500
csiph-web