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


Groups > gnu.bash.bug > #14521

Re: Add sleep builtin

Path csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From L A Walsh <bash@tlinx.org>
Newsgroups gnu.bash.bug
Subject Re: Add sleep builtin
Date Tue, 21 Aug 2018 18:11:14 -0700
Lines 29
Approved bug-bash@gnu.org
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>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1534900413 6550 208.118.235.17 (22 Aug 2018 01:13:33 GMT)
X-Complaints-To action@cs.stanford.edu
Cc konsolebox <konsolebox@gmail.com>, bug-bash <bug-bash@gnu.org>
To Clint Hepner <clint.hepner@gmail.com>
Envelope-to bug-bash@gnu.org
User-Agent Thunderbird
In-Reply-To <83513822-23BF-4695-9542-F967512A8A3D@gmail.com>
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy]
X-Received-From 173.164.175.65
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:14521

Show key headers only | View raw



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


Thread

Re: Add sleep builtin L A Walsh <bash@tlinx.org> - 2018-08-21 18:11 -0700

csiph-web