Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14521
| From | L A Walsh <bash@tlinx.org> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Add sleep builtin |
| Date | 2018-08-21 18:11 -0700 |
| Message-ID | <mailman.5389.1534900413.1292.bug-bash@gnu.org> (permalink) |
| References | <CAJnmqwZ1GUZRtGRHt8xy_-tdTjVsAQKt-toGAEn5e9gjFrR0vQ@mail.gmail.com> <83513822-23BF-4695-9542-F967512A8A3D@gmail.com> |
Clint Hepner 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. If not, you probably want to find an alternative to polling anyway. > If he implements sleep with the floating point option then the above might not be true: sleep .001 (ms sleep)...not practical if loaded each time) I often use sleep .1/.3/.5 ... if the builtin doesn't support sleep times < 1 second, then it's probably not worth it. Also, needs to actually sleep for the listed time. I remember some implementations only wait till the clock reaches the new time in seconds -- meaning that the actual sleep time could be .001 seconds.
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Add sleep builtin L A Walsh <bash@tlinx.org> - 2018-08-21 18:11 -0700
csiph-web