projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
switch to using trap number 31 for syscalls on sh
[oweals/musl.git]
/
src
/
unistd
/
ualarm.c
1
#define _GNU_SOURCE
2
#include <unistd.h>
3
#include <sys/time.h>
4
5
unsigned ualarm(unsigned value, unsigned interval)
6
{
7
struct itimerval it = {
8
.it_interval.tv_usec = interval,
9
.it_value.tv_usec = value
10
};
11
setitimer(ITIMER_REAL, &it, &it);
12
return it.it_value.tv_sec*1000000 + it.it_value.tv_usec;
13
}