[zeromq-dev] czmq zloop timers and setting system time

Pieter Hintjens ph at imatix.com
Wed Jul 23 20:23:20 CEST 2014

Sounds like a good improvement... I'd say go for it.

On Wed, Jul 23, 2014 at 4:53 AM, Matt Spencer <spencemt at gmail.com> wrote:
> 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
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list