From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 8 May 2005 14:03:23 +0200 From: Christoph Lohmann <20h@r-36.net> To: 9fans@cse.psu.edu Message-Id: <20050508140323.14c96b22.20h@r-36.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [9fans] Sleep-complexity Topicbox-Message-UUID: 46742a60-ead0-11e9-9d60-3106f5b1d025 Good day. Just do be sure that there is no scientifc paper that describes the pro of using for() in sleep(2), as an architecture decision: % cat /n/sources/plan9/sys/src/cmd/sleep.c #include #include void main(int argc, char *argv[]) { long secs; if(argc>1) for(secs = atol(argv[1]); secs > 0; secs--) sleep(1000); exits(0); } % cat /sys/src/cmd/sleep.c #include #include void main(int argc, char *argv[]) { if(argc>1) sleep(atol(argv[1]) * 1000); exits(0); } % ls -l /386/bin/sleep /386/bin/_sleep --rwxrwxr-x M 8 none sys 3409 May 8 13:43 /386/bin/_sleep --rwxrwxr-x M 8 sys sys 3390 Max 8 13:44 /386/bin/sleep Is there any reason for the for()-loop? Sincerely, Christoph