From owner-freebsd-bugs Thu Apr 25 4:10:16 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id AC21237B423 for ; Thu, 25 Apr 2002 04:10:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3PBA3p27657; Thu, 25 Apr 2002 04:10:03 -0700 (PDT) (envelope-from gnats) Date: Thu, 25 Apr 2002 04:10:03 -0700 (PDT) Message-Id: <200204251110.g3PBA3p27657@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: bin/37442: [PATCH] sleep.c to support time multipliers Reply-To: Peter Pentchev Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/37442; it has been noted by GNATS. From: Peter Pentchev To: Edwin Groothuis Cc: bug-followup@FreeBSD.org Subject: Re: bin/37442: [PATCH] sleep.c to support time multipliers Date: Thu, 25 Apr 2002 14:07:17 +0300 On Thu, Apr 25, 2002 at 03:49:24PM +1000, Edwin Groothuis wrote: > > >Number: 37442 > >Category: bin > >Synopsis: [PATCH] sleep.c to support time multipliers > >Originator: Edwin Groothuis > >Description: > > I want to run my nightly downloads run in an xterm, so I can check > if they've run properly. Often I have to delay them for hours and > am now pretty good skilled in the multiplication table of 1800, but > now and then things are one hour off. To solve this, I've modified > sleep(1) to support multipliers: sleep 1h will sleep for one hour, > sleep 2.5m will sleep for two and a half minute. Mmm... not to knock your patch down, but.. you do realize that this can be done with expr(1) and/or shell built-in arithmetic functions (ksh and bash have $((5 * 1800)), don't know about other shells), right? G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 No language can express every thought unambiguously, least of all this one. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message