aboutsummaryrefslogtreecommitdiff
path: root/src/linux/stime.c
blob: 7d0443ba3b668b80d0240964c784f8e78c1e6a84 (plain)
1
2
3
4
5
6
7
8
9
#define _GNU_SOURCE
#include <time.h>
#include <sys/time.h>

int stime(const time_t *t)
{
	struct timeval tv = { .tv_sec = *t, .tv_usec = 0 };
	return settimeofday(&tv, (void *)0);
}