14 lines
266 B
C++
14 lines
266 B
C++
|
#include <bits/errno-return.h>
|
||
|
#include <sys/syscall.h>
|
||
|
#include <time.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
extern "C"
|
||
|
{
|
||
|
int clock_gettime(clockid_t id, struct timespec* ts)
|
||
|
{
|
||
|
long rc = syscall(SYS_clock_gettime, id, ts);
|
||
|
__errno_return(rc, int);
|
||
|
}
|
||
|
}
|