Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: konsolebox Newsgroups: gnu.bash.bug Subject: Re: Add sleep builtin Date: Mon, 20 Aug 2018 01:12:01 +0800 Lines: 22 Approved: bug-bash@gnu.org Message-ID: References: <83513822-23BF-4695-9542-F967512A8A3D@gmail.com> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1534698765 30699 208.118.235.17 (19 Aug 2018 17:12:45 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash To: Clint Hepner Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Wrwd0c8fGtc55BHryG5VBCCKp6d7ogDoPs6vK2fQ7rQ=; b=qqz7e4UtkPbvBPmD2xKLsY/beXzL1qlIwFTjIBEddYlQAOuAdyG6HFJVvuf1/bXKd+ SefrZFRFCWg0oBYVQIT15Pvx8v4P+XAcO9AWmWRtDoLEagX5TBeZtMEuvc/ZI40XD/6w +cG/oQLcaCTjtPE6ncYC/9Nm4Ub9u3p+Wh9KCMSdlB+100EZ8tgrOp733lORDHZP2PaE Omp922arp/vMAQVyUl4piWW+JD+nz5Bu0gScLE0CW5duKpsPeEtkoG+sF0jBNQoGBtjR 9e+83dhE9xPEBt0zNiwyd81yaizOXrGPupUIYpPVMg3PfmnJlsM6Hkk2JKbvVYRdhQvr NJ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Wrwd0c8fGtc55BHryG5VBCCKp6d7ogDoPs6vK2fQ7rQ=; b=dyLwXXEYTtNTYvOnIODofeXD7DLFUY3R790wjk9+SH3KKka8n0VZO7OJO/PjB68QmA A7Zk7mPjWGDcOvdrvtRhCsTFW680YGv4zfJiv4ch7i/nP/0KE8QwakLtLsUfHHMymTH6 9B7Bxvb3/xopM5V9GjDxzhPfRAQz4osA4JqY4HbFEF8jGLvh6eixAMnrNsz7gkGbE/Wn AyofkhE9D0eJjeqpu+UNbpvv9u4DWtLsM5za4DIHWs8kkn3VkcOlxM6aPHZaH0hbe4i6 JCN0/pSc41pCpc13exgRmGIUjv0uBCql8nXXic31/2xQmWwHJjvfeTaizGqWt/EMogNs S/PA== X-Gm-Message-State: AOUpUlFOq0QKNgB3Y1C5WXPiDRxxKk8m+HmzBg1BvH7BuXO3jzXcQ81l hcaNisyLM3ysUDi/Gm/7NOMI/5J0jUHkX3RcmBk= X-Google-Smtp-Source: AA+uWPwYGHF4CjKUWVJ741Pnu8jWMxa0K8FDNscrh4Ik8qvJRi2qqyt+/JHmTqeWAUWQodPjGMNpmebf5aASEa1g8TE= X-Received: by 2002:a6b:d111:: with SMTP id l17-v6mr35863414iob.146.1534698761482; Sun, 19 Aug 2018 10:12:41 -0700 (PDT) In-Reply-To: <83513822-23BF-4695-9542-F967512A8A3D@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::22a X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:14507 On Mon, Aug 20, 2018 at 12:26 AM, Clint Hepner wrote: > >> On Aug 19, 2018, at 10:25 AM, konsolebox 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