[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Portable (as possible) sub-second timers

From: Howard Chu
Subject: Re: Portable (as possible) sub-second timers
Date: Sat, 05 Nov 2005 19:05:53 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051027 SeaMonkey/1.1a

Paul Smith wrote:
Hi all;

It doesn't seem that autoconf has any macros that provide for sub-second
timers.  Is there any agreed-upon standard for managing this?  Is
setitimer() the most portable option for sub-second timestamps?  Are
there known portability issues with it?

Should I check for usleep() if setitimer doesn't exist?  What about
nanosleep()?  I expect many systems would need to realtime library
(-lrt) linked to use nanosleep()?  Or not?

The tried-and-true method for the past 20-some years has been select() with no descriptor sets...

  -- Howard Chu
  Chief Architect, Symas Corp.
  Director, Highland Sun
  OpenLDAP Core Team  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]