Commit 30c1cba4 authored by Martin Sustrik's avatar Martin Sustrik

latency optimisation for the case where there are no timers

parent 238640a5
...@@ -66,6 +66,10 @@ void zmq::poller_base_t::cancel_timer (i_poll_events *sink_, int id_) ...@@ -66,6 +66,10 @@ void zmq::poller_base_t::cancel_timer (i_poll_events *sink_, int id_)
uint64_t zmq::poller_base_t::execute_timers () uint64_t zmq::poller_base_t::execute_timers ()
{ {
// Fast track.
if (timers.empty ())
return 0;
// Get the current time. // Get the current time.
uint64_t current = clock.now_ms (); uint64_t current = clock.now_ms ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment