From owner-freebsd-hackers Sun Oct 12 09:01:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA29012 for hackers-outgoing; Sun, 12 Oct 1997 09:01:14 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from coconut.itojun.org (root@coconut.itojun.org [210.160.95.97]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA29007 for ; Sun, 12 Oct 1997 09:01:10 -0700 (PDT) (envelope-from itojun@itojun.org) From: itojun@itojun.org Received: from localhost (itojun@localhost.itojun.org [127.0.0.1]) by coconut.itojun.org (8.8.5/3.6Wbeta6) with ESMTP id AAA10518; Mon, 13 Oct 1997 00:59:35 +0900 (JST) To: Luigi Rizzo cc: xaa@stack.nl (Mark Huizer), joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@FreeBSD.ORG, denny1@home.com In-reply-to: luigi's message of Sun, 12 Oct 1997 14:54:38 +0100. <199710121354.OAA03525@labinfo.iet.unipi.it> X-Template-Reply-To: itojun@itojun.org X-Template-Return-Receipt-To: itojun@itojun.org X-PGP-Fingerprint: F8 24 B4 2C 8C 98 57 FD 90 5F B4 60 79 54 16 E2 Subject: Re: wish /bin/sleep handled fractions of a second. Date: Mon, 13 Oct 1997 00:59:35 +0900 Message-ID: <10514.876671975@coconut.itojun.org> Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> I'd like it too. Is it too tough? Perhaps in 2 weeks, after finishing my >> graduation, I could look at it. Either you change sleep to look like: >> sleep [-m] NUMBER >> where -m means: the NUMBER is in milliseconds >> or you make it: >> sleep NUMBER[.NUMBER] >> where .number is the decimal part of the second. >> Any preferences? >better the one with fractional notation, and since you are at it, make >it handle microseconds or in 3-4 years with the Intel-P9 @ 2.49GHz >we are going to have the same problem of not enough resolution... Is it so meaningful to provide very high resolution timing with sleep(1)? There will be error in timing due to disk access for sleep(1) binary, process fork/exec time, and so forth. IMHO, 1/10sec resolution may worth it, but beyond that becoming more and more meaningless. I have no problem with the current behavior of sleep(1). Is there any standard, like POSIX, established for sleep(1)? itojun