1
/* $Header: /tmp/hpctools/ga/tcgmsg/ipcv5.0/usleep.c,v 1.4 1997-11-07 23:44:20 d3h325 Exp $ */
5
#include <sys/select.h>
13
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
28
Sleep for the specified no. of micro-seconds ... uses the timeout
29
on select ... it seems to be accurate to about a few centiseconds
30
on a sun. I don't know how much system resources it eats.
34
struct timeval timelimit;
36
/* printf("%2ld: sleeping for %ldus\n", TCGMSG_nodeid, us);
39
timelimit.tv_sec = (int) (us/1000000);
40
timelimit.tv_usec = (int) (us - timelimit.tv_sec*1000000);
42
(void) select(width, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0,