[zeromq-dev] zmq::poll timeout returns immediately on MacOS/X 10.5

Martin Sustrik sustrik at 250bpm.com
Fri Jun 11 19:38:44 CEST 2010

>     Marcin Gozdalik wrote:
>      > Avg. us/call Elapsed Name
>      > 0.064833 0.648334 clock_gettime(2/CLOCK_REALTIME)
>      > 0.009635 0.096351 clock_gettime(2/CLOCK_REALTIME_COARSE)
>     That's a pretty good performance! I wouldn't hesitate to use it in
>     zmq_poll. The impact on non-Linux systems is still unknown though.

Still, the solution is not obvious. 9 or 64 nanoseconds to measure time 
as shown above would be more or less OK. It would decrease throughput in 
tight zmq_poll-based loops by some 5-20 per cent. However, if some OSes 
report time measurement taking 10 ms it would decrease throughput 5000 
times or so -- which is not acceptable.


More information about the zeromq-dev mailing list