[zeromq-dev] czmq zloop timers and setting system time
Matt Spencer
spencemt at gmail.com
Wed Jul 23 04:53:11 CEST 2014
Hi,
I've got an application that is using czmq. One of the use cases for the
application is to set the system time. I've found that when the system
time is set back in time, the zloop timers stop triggering until the system
time reaches its previous setting.
Looking at the zloop and zclock implementations, it seems that the zloop
timers are based on absolute time (zclock_time, which calls gettimeofday),
which explains what i'm seeing.
I would like to propose using a monotonic timer (either within zclock_time,
or creating a new monotonic time interface) for the zloop timers, since the
triggering logic is only computing time differences. The core libzmq
library seems to handle system time changes just fine in its polling
timeouts.
I actually have an implementation of czmq using a monotonic time that is
working on Linux (the built in test work at least). I would like to hear
feedback on this idea. I would like to provide the patch for this, but I
also need to do some work on the Windows side first.
Any thoughts? This would be my fist contribution.
Thanks,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140722/cf8bce29/attachment.htm>
More information about the zeromq-dev
mailing list