Merge pull request #429 from CopernicaMarketingSoftware/fix/remove-timer-again-call
Remove ev_timer_again calls
This commit is contained in:
commit
4f54507a03
|
|
@ -267,12 +267,12 @@ private:
|
||||||
// sent only after _timout/2 seconds again _from now_ (no catching up)
|
// sent only after _timout/2 seconds again _from now_ (no catching up)
|
||||||
_next = now + std::max(_timeout / 2, 1);
|
_next = now + std::max(_timeout / 2, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset the timer to trigger again later
|
// reset the timer to trigger again later
|
||||||
ev_timer_set(&_timer, std::min(_next, _expire) - now, 0.0);
|
ev_timer_set(&_timer, std::min(_next, _expire) - now, 0.0);
|
||||||
|
|
||||||
// restart the timer
|
// and start it again
|
||||||
ev_timer_again(_loop, &_timer);
|
ev_timer_start(_loop, &_timer);
|
||||||
|
|
||||||
// and because the timer is running again, we restore the refcounter
|
// and because the timer is running again, we restore the refcounter
|
||||||
ev_unref(_loop);
|
ev_unref(_loop);
|
||||||
|
|
@ -368,9 +368,6 @@ private:
|
||||||
// find the earliest thing that expires
|
// find the earliest thing that expires
|
||||||
ev_timer_set(&_timer, std::min(_next, _expire) - now, 0.0);
|
ev_timer_set(&_timer, std::min(_next, _expire) - now, 0.0);
|
||||||
|
|
||||||
// restart the timer
|
|
||||||
ev_timer_again(_loop, &_timer);
|
|
||||||
|
|
||||||
// expose the accepted interval
|
// expose the accepted interval
|
||||||
return _timeout;
|
return _timeout;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue