diff options
Diffstat (limited to 'compat/time32/clock_getres_time32.c')
-rw-r--r-- | compat/time32/clock_getres_time32.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compat/time32/clock_getres_time32.c b/compat/time32/clock_getres_time32.c new file mode 100644 index 00000000..47a24c13 --- /dev/null +++ b/compat/time32/clock_getres_time32.c @@ -0,0 +1,13 @@ +#include "time32.h" +#include <time.h> + +int __clock_getres_time32(clockid_t clk, struct timespec32 *ts32) +{ + struct timespec ts; + int r = clock_getres(clk, &ts); + if (!r && ts32) { + ts32->tv_sec = ts.tv_sec; + ts32->tv_nsec = ts.tv_nsec; + } + return r; +} |