Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!cme!libes From: libes@cme.nist.gov (Don Libes) Newsgroups: comp.unix.wizards Subject: Re: usleep by poll() Message-ID: <1011@muffin.cme.nist.gov> Date: 2 Apr 91 01:08:04 GMT References: <6925@auspex.auspex.com> <999@muffin.cme.nist.gov> <127226@uunet.UU.NET> Organization: National Institute of Standards and Technology Lines: 21 In article <127226@uunet.UU.NET> rbj@uunet.UU.NET (Root Boy Jim) writes: }In article <999@muffin.cme.nist.gov> libes@cme.nist.gov (Don Libes) writes: }The BSD analog to this function is defined in terms of microseconds }>while poll() is defined in terms of milliseconds. For compatibility, }>this function provides accuracy "over the long run" by truncating }>actual requests to milliseconds and accumulating microseconds across }>calls with the idea that you are probably calling it in a tight loop, }>and that over the long run, the error will even out. }Yeah, but what's the best resolution you've ever seen? }Ten milliseconds seems to be the lowest. Since the average }error is have the smallest scheduling interval, why bother? Room for improvement in the future, and compatibility with such. Why did BSD provide usleep in the first place? }Perhaps they replaced the monster in 225's basement with a Cray? In fact, they did. NIST just received a Cray YMP. Don Libes libes@cme.nist.gov ...!uunet!cme-durer!libes