No, really, I'm quite serious. A grep of /sys/src/cmd/ suggests that
most sleeps are relatively large, and arbitrary.
None of the applications look likely to need microsecond let alone
nanosecond resolution, and that seems reasonable to me.
One exception is sleep(0), but that's yield()

If I want tight timing, I'll switch to a real-time discipline,
including scheduling.



On 28 November 2012 12:57, erik quanstrom <[email protected]> wrote:
> On Wed Nov 28 02:38:39 EST 2012, [email protected] wrote:
>> the relative unimportance of sleep?
>>
>> On 27 November 2012 23:19, erik quanstrom <[email protected]> wrote:
>> > why is sleep(2) limited in resolution to HZ in the
>> > portable code?  the underlying mechanism is often
>> > much finer grained than HZ, and if there is a limit,
>> > one would think that it's related to the hardware
>> > mechanism, not the HZ clock.  i'm clearly missing
>> > something.
>
> that's not helpful.
>
> - erik
>

Reply via email to