summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-09-27 09:34:00 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-09-27 09:34:00 +0200
commit30c1cba4e4276f4ddcb5a455fdd62d4d6bd1edd2 (patch)
treefcb2ff479ac26e2cd8a0808fc60100e1504aa5e9 /src
parent238640a526c419392bf2df95de196db89ea6eb73 (diff)
latency optimisation for the case where there are no timers
Diffstat (limited to 'src')
-rw-r--r--src/poller_base.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/poller_base.cpp b/src/poller_base.cpp
index d55692a..661b964 100644
--- a/src/poller_base.cpp
+++ b/src/poller_base.cpp
@@ -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 ()
{
+ // Fast track.
+ if (timers.empty ())
+ return 0;
+
// Get the current time.
uint64_t current = clock.now_ms ();