Re: Portable (as possible) sub-second timers

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

 



"Paul Smith" <psmith@xxxxxxxxxx> writes:

> 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?

gnulib's nanosleep module will arrange for the -lrt and/or substitute
code if your host lacks nanosleep().  There's also the gnulib
xnanosleep module if you prefer a simpler interface.

I'm not sure why you mention setitimer as well -- what facilities do
you need other than sleeping?  But if you merely want a
high-resolution timer that is not subject to resetting or drifting,
gnulib has a gethrxtime module with support for such timers under
FreeBSD, Solaris, POSIX with CLOCK_MONOTONIC, etc.  It also knows
about -lrt.

http://www.gnu.org/software/gnulib/


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux