[zeromq-dev] zmq_poll: timeout issue

Steven McCoy steven.mccoy at miru.hk
Wed Aug 11 05:00:04 CEST 2010


On 10 August 2010 22:17, Martin Lucina <mato at kotelna.sk> wrote:

> > PS I recommend CLOCK_MONOTONIC, but it may not be available, and
> > requires -lrt ...
>
> Yeah, that's why gettimeofday() (and some equivalent I forget right now on
> Win32) is a decent portable alternative.
>
>
gettimeofday() is better for most users of RHEL as it can execute in user
space and transparently use rdtscp() and gain high resolution similar to
Windows' QueryPerformanceCounter().  The Linux & glibc developers are slow
to update all the timing APIs to use high resolution timers and the POSIX
clock API has suffered from changes between releases.

Visual Studio 2008 (although MSDN only says 2010) includes intrinsics for
rdtscp() but until 7 SP1/2008 R2 SP1 I get the impression that
QueryPerformanceCounter() only scales up to HPET.

Oodles and oodles of more blogs and papers appear about the topic as
multi-core gaming and general programming have been hitting such issues.
 VMware has been the most comprehensive so far.

https://www.vmware.com/pdf/vmware_timekeeping.pdf

-- 
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100811/eafce640/attachment.htm>


More information about the zeromq-dev mailing list