Path: utzoo!utgpu!attcan!uunet!husc6!mailrus!purdue!decwrl!ucbvax!ernie.Berkeley.EDU!jas From: jas@ernie.Berkeley.EDU (Jim Shankland) Newsgroups: comp.lang.c Subject: Re: Delay for a fraction of a second in C Message-ID: <26678@ucbvax.BERKELEY.EDU> Date: 3 Nov 88 23:21:11 GMT References: <1145@orion.cf.uci.edu> <2804@ingr.UUCP> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: jas@ernie.Berkeley.EDU.UUCP (Jim Shankland) Followup-To: comp.unix.questions Organization: University of California, Berkeley Lines: 19 In article <2804@ingr.UUCP> crossgl@ingr.UUCP (Gordon Cross) writes: >You are not going to be able to do [sub-second sleeps] without coding >up some kind of "delay loop" yourself.... >Remember that in the UNIX kernal, scheduled wakeups occur at fixed >one second intervals. Thus, unless you are using a non standard kernal, sleeps >of only whole numbers of seconds are possible! Never trust statements about the UNIX kernel from people who can't even spell the word. Kernel timeouts can occur at 1/HZ second intervals, where HZ is typically 60 or 100. The kernel CAN provide a system call to let processes set alarms at that granularity -- BSD and derivatives do (setitimer). SysV-flavored systems just don't bother. (Or is this fixed in SysVR3?) ----- Jim Shankland jas@ernie.berkeley.edu "The God I believe in isn't short of cash, MISTER!"