chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[PATCH] DEVPATH for netdev
[elogind.git]
/
klibc
/
klibc
/
usleep.c
1
/*
2
* usleep.c
3
*/
4
5
#include <errno.h>
6
#include <time.h>
7
8
void usleep(unsigned long usec)
9
{
10
struct timespec ts;
11
12
ts.tv_sec = usec/1000000UL;
13
ts.tv_nsec = (usec%1000000UL) * 1000;
14
while ( nanosleep(&ts,&ts) == -1 && errno == EINTR );
15
}