]> git.ipfire.org Git - thirdparty/squid.git/blob - lib/xusleep.c
Merge form trunk
[thirdparty/squid.git] / lib / xusleep.c
1 #include "config.h"
2 #include "profiler/Profiler.h"
3 #include "xusleep.h"
4
5 #if HAVE_UNISTD_H
6 #include <unistd.h>
7 #endif
8
9 /**
10 * xusleep, as usleep but accepts longer pauses
11 */
12 int
13 xusleep(unsigned int usec)
14 {
15 /* XXX emulation of usleep() */
16 struct timeval sl;
17 sl.tv_sec = usec / 1000000;
18 sl.tv_usec = usec % 1000000;
19 return select(0, NULL, NULL, NULL, &sl);
20 }