usleep by poll()
Don Libes
libes at cme.nist.gov
Tue Apr 2 11:08:04 AEST 1991
In article <127226 at uunet.UU.NET> rbj at uunet.UU.NET (Root Boy Jim) writes:
}In article <999 at muffin.cme.nist.gov> libes at 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 at cme.nist.gov ...!uunet!cme-durer!libes
More information about the Comp.unix.wizards
mailing list