From 66ef76c795a609f193929fde79b5751dc2a80e98 Mon Sep 17 00:00:00 2001 From: "Robert G. Jakabosky" Date: Sat, 23 Aug 2014 00:47:03 +0800 Subject: [PATCH] Fix API docs for poller timeout units. --- API.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 9cdcb8e..6083fbc 100644 --- a/API.md +++ b/API.md @@ -226,10 +226,14 @@ Remove a socket/fd from the poller. ## poll(timeout) -Wait `timeout` microseconds for events on the registered sockets (timeout = -1, means +Wait `timeout` milliseconds [1] for events on the registered sockets (timeout = -1, means wait indefinitely). If any events happen, then those events are dispatched. - poller:poll(1000000) -- wait 1 second for events. + poller:poll(1000) -- wait 1 second for events. + +[1] For zmq 2.x `timeout` is in microseconds. For versions 3.x or higher `timeout` will be in milliseconds. + + poller:poll(1000 * zmq.POLL_MSEC) -- backwards/forwards compatible ## start()