diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2012-04-19 20:17:47 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-04-20 06:59:47 +0200 |
commit | ce2b29af43b4624e053377ef00c5a7e2b80c08b7 (patch) | |
tree | af6bfc20de9fd2c9752dc1924a2db45b040133b6 /src/surveyor.cpp | |
parent | 18a61b7cd60399944972482fabab4d7e81ffddae (diff) |
Clock instance removed from surveyor_t
SURVEYOR socket now uses clock instance from socket_base_t
for measuring survey timeout. This allows for better performance
in tight xs_recv() loops.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/surveyor.cpp')
-rw-r--r-- | src/surveyor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/surveyor.cpp b/src/surveyor.cpp index b76128b..2208146 100644 --- a/src/surveyor.cpp +++ b/src/surveyor.cpp @@ -75,7 +75,7 @@ int xs::surveyor_t::xsend (msg_t *msg_, int flags_) if (!options.survey_timeout) timeout = -1; else - timeout = clock.now_ms () + options.survey_timeout; + timeout = now_ms () + options.survey_timeout; return 0; } @@ -132,7 +132,7 @@ bool xs::surveyor_t::xhas_out () int xs::surveyor_t::rcvtimeo () { - int t = timeout - clock.now_ms (); + int t = timeout - now_ms (); if (t < 0) return options.rcvtimeo; if (options.rcvtimeo < 0) |