talk session

Nathaniel Ingersol natha at hal.com
Fri May 10 02:14:06 AEST 1991


In article <1489 at cvbnetPrime.COM> mkaminsk at cvbnet.prime.com (mailhost) writes:
:
:Actually usleep(3) is going away in System V Release 4 (SVr4)
:so you can use select(2):
:
:    #include <stdio.h>
:    #include <sys/types.h>
:    #include <sys/time.h>
:
:    struct timeval      timeout;
:
:    timeout.tv_sec = 0;
:    timeout.tv_usec = number_of_microseconds;
:
:    /* call select for it's timeout feature */
:    select(1, NULL, NULL, NULL, &timeout);
:

Am I missing something here, or why can't you just make a usleep out
of setitimer?  You could even use ITIMER_REAL.

N



More information about the Comp.unix.wizards mailing list