mailing list of musl libc
 help / color / mirror / code / Atom feed
2985855c72afd3e4b88fca07a1179634b1bf1af6 blob 323 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/time.h>

unsigned ualarm(unsigned value, unsigned interval)
{
	struct itimerval it = {
		.it_interval.tv_usec = interval,
		.it_value.tv_usec = value
	}, it_old;
	setitimer(ITIMER_REAL, &it, &it_old);
	return it_old.it_value.tv_sec*1000000 + it_old.it_value.tv_usec;
}
debug log:

solving 2985855c ...
found 2985855c in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).