On Friday, July 25, 2014 4:24:30 AM UTC-5, Fedor Indutny wrote:
>
> What if the callback execution would take 1000ms to run? Would you like it 
> to just constantly spin?
>

Yep. I'll deal with the consequences of that myself.
 

>
> Cheers.
>
>
> On Fri, Jul 25, 2014 at 1:22 PM, William Ehlhardt <[email protected] 
> <javascript:>> wrote:
>
>> Hi all,
>>
>> uv_timer_t's run interval seems to schedule the next run for $interval ms 
>> *after* the callback completes, instead of accounting for the callback run 
>> time and scheduling the next wakeup for $callback_start_time + $interval.
>>
>> For example, if I set the interval to 1000ms, and the callback takes 
>> 100ms to run, the callback will actually get run every 1100ms by libuv. Is 
>> there a way to make it run every 1000ms instead?
>>
>> See attached program for a demonstration. I expect the time to print out 
>> every 5s, but it prints out every 7s because of the 2s sleep() in the 
>> callback.
>>
>> -William
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] <javascript:>
>> .
>> Visit this group at http://groups.google.com/group/libuv.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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