summaryrefslogtreecommitdiff
path: root/lib/libc/arch/x86_64/clock_gettime.c
blob: 6a7a38743fe45281f19a681d22bb43060dfc2ff8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <asm/vdso.h>
#include <syscall.h>
#include <time.h>

int clock_gettime(clockid_t clock_id, struct timespec *tp)
{
#if defined(__x86_64__)
	if (__vdso_clock_gettime)
		return __vdso_clock_gettime(clock_id, tp);
#endif

	return syscall(clock_gettime, clock_id, tp);
}