[zeromq-dev] zmq_poll stops expiring timeout in virtualized Windows 7

Steven McCoy steven.mccoy at miru.hk
Tue Oct 15 20:53:09 CEST 2013

On 15 October 2013 13:48, Felipe Farinon <felipe.farinon at powersyslab.com>wrote:

> I have found that
> VirtualBox's QueryPerformanceCounter doesn't guarantee monotonicity
> https://www.virtualbox.org/ticket/11951. They argue that even Windows
> QueryPerformanceCounter doesn't guarantee it.

This is true, the performance counters are highly unreliable.  With OpenPGM
I followed the SQL Server teams approach and move towards Windows
multimedia timers they offer greater stability and lower cost.  Copy &

/* Multi-media like timer API, returns 100-nanoseconds intervals.
 * Faster than QueryPerformanceCounter and hence deployed for SQL Server.
pgm_mmtime_update (void)
        FILETIME ft;
        int64_t aligned_ft;

        GetSystemTimeAsFileTime (&ft);
        memcpy (&aligned_ft, &ft, sizeof (int64_t));
        return (pgm_time_t)( aligned_ft / 10 );

The caveat being you are still affected by NTP adjustments, but this is
available on platform where *GetTickCount64* is not.

GHC Haskell had similar discussions:


Chromiums discussion on topic:


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131015/841d6941/attachment.htm>

More information about the zeromq-dev mailing list