iconv: add euro symbol to GBK as single byte 0x80
[musl.git] / src / time / clock_getres.c
blob81c6703761d4484f4001d10a22123a9a5b859ce6
1 #include <time.h>
2 #include "syscall.h"
4 int clock_getres(clockid_t clk, struct timespec *ts)
6 #ifdef SYS_clock_getres_time64
7 /* On a 32-bit arch, use the old syscall if it exists. */
8 if (SYS_clock_getres != SYS_clock_getres_time64) {
9 long ts32[2];
10 int r = __syscall(SYS_clock_getres, clk, ts32);
11 if (!r && ts) {
12 ts->tv_sec = ts32[0];
13 ts->tv_nsec = ts32[1];
15 return __syscall_ret(r);
17 #endif
18 /* If reaching this point, it's a 64-bit arch or time64-only
19 * 32-bit arch and we can get result directly into timespec. */
20 return syscall(SYS_clock_getres, clk, ts);