[zeromq-dev] zmq_poll: timeout issue

Oliver Smith oliver at kfs.org
Wed Aug 11 10:00:28 CEST 2010


On 8/10/2010 10:00 PM, Steven McCoy wrote:
> 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.
The caveat to gettimeofday portability is that of backwards portability. 
One of my old clients still runs the accounting/stock 
control/warehouse/rentals/payroll system I wrote for them 20 years ago 
on Xenix!

It's only relatively recently that gettimeofday stopped being a real 
hefty kernel call overhead.

As long as you are aware of the legacy, gettimeofday is a good choice 
for forward looking portability.


- Oliver

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


More information about the zeromq-dev mailing list