2014-09-29 11:45 GMT+02:00 Jean-Christian de Rivaz <[email protected]>:
> Le lundi 29 septembre 2014 11:10:27 UTC+2, Iñaki Baz Castillo a écrit :
>>
>> Given that UV periodic timer is just an API sugar over the regular
>> timer, would not make sense that the loop execution time is taken into
>> account when setting the next timer period?
>>
>> This is:
>>
>> - Run periodic timer with interval 100 ms.
>> - First loop iteration takes 15 ms.
>> - Somehow libuv knows that and set the timer next period on 85 ms.
>>
>> Just wondering.
>
>
> This is how periodic timers was handled in many libraries and applications
> before the timerfd_* syscall introduction, but proved to be very difficult
> to get a small jitter and to compensate the phase over time.

Clear, thanks a lot for clarifying it.


-- 
Iñaki Baz Castillo
<[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to