From owner-freebsd-current@FreeBSD.ORG Tue May 28 23:46:37 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E77C62C7; Tue, 28 May 2013 23:46:37 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) by mx1.freebsd.org (Postfix) with ESMTP id B39B937F; Tue, 28 May 2013 23:46:37 +0000 (UTC) Received: by mail-ie0-f169.google.com with SMTP id u16so23066309iet.14 for ; Tue, 28 May 2013 16:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=oDcbWLNhAVG5ouL5p7OFQ9gCdbRaz0yfvspUxC0MiRk=; b=wAk9X0niVoTO2x3peVzLmhVh5pcZ9NiDqM/Zj3hEzt9gir4ih/BAkek6VuYLxmo5ym 1HZ/Rb1K+H9aL/cxRwFrlWbVxjjc2HAZzvPpO6QQFkTNv1/BdbgLEiRqOdgPCUoRFv3r z+gezucUdjWORF2qpKsVixjjL1M8hiOR51BRQlewV1RXHb/ILpFfCtaDTwiyXwDicrnl f/BOrHRnD1lsJxOyDz220kQj9nGiU2BrKSf5nSPDz5a0TDkfri+0z8sns+jDqkNPsBoG hAKf54K4H06cGElCY7mV2QXF9DW8VF8xSpfoTt5WC+5vi9y6+lhr03jptUqK5QGy7QuH lqnQ== X-Received: by 10.50.20.130 with SMTP id n2mr8329834ige.87.1369784797455; Tue, 28 May 2013 16:46:37 -0700 (PDT) Received: from [192.168.1.34] (c-98-212-197-211.hsd1.il.comcast.net. [98.212.197.211]) by mx.google.com with ESMTPSA id y11sm7046140igy.10.2013.05.28.16.46.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 May 2013 16:46:36 -0700 (PDT) Message-ID: <51A541B5.3010905@gmail.com> Date: Tue, 28 May 2013 18:45:57 -0500 From: Joshua Isom User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Kenta Suzumoto Subject: Re: BSD sleep References: <20130528230140.A5B396F448@smtp.hushmail.com> In-Reply-To: <20130528230140.A5B396F448@smtp.hushmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2013 23:46:38 -0000 On 5/28/2013 6:01 PM, Kenta Suzumoto wrote: > Hi. Is there no built-in way of making "sleep" sleep in increments > of minutes, hours, etc? The GNU "sleep" can be invoked like "sleep > 1h" for an hour. The FreeBSD one's manpage leads me to believe we > can only use seconds, which is kind of annoying. Is there an > undocmented or missing feature here? Seems really trivial to > implement. > > ~ $ sleep 1h > usage: sleep seconds > You think it's trivial until you read this: http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time If you sleep one hour, do you sleep one hour from now or one hour from the system clock which may change in the next hour? If it's the system clock, you may sleep for ten minutes or ten hours. If you need to sleep for 3600 seconds, that's simple and understandable.