Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Oct 1997 00:59:35 +0900
From:      itojun@itojun.org
To:        Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Cc:        xaa@stack.nl (Mark Huizer), joerg_wunsch@uriah.heep.sax.de, freebsd-hackers@FreeBSD.ORG, denny1@home.com
Subject:   Re: wish /bin/sleep handled fractions of a second. 
Message-ID:  <10514.876671975@coconut.itojun.org>
In-Reply-To: luigi's message of Sun, 12 Oct 1997 14:54:38 %2B0100. <199710121354.OAA03525@labinfo.iet.unipi.it> 

next in thread | previous in thread | raw e-mail | index | archive | help

>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10514.876671975>