blob: 5195da38f3d304237e6c6166d2c8c40d5c555df1 [file] [log] [blame]
Petr Vorelff3c9782019-10-02 12:51:04 +02001// SPDX-License-Identifier: GPL-2.0-or-later
Cyril Hrubis62fe7122017-06-20 15:42:17 +02002/*
3 * Copyright (c) 2017 Cyril Hrubis <chrubis@suse.cz>
Cyril Hrubis62fe7122017-06-20 15:42:17 +02004 */
5
6/*
7 * clock_gettime() and clock_getres() functions
8 */
9
10#define _GNU_SOURCE
11#include <unistd.h>
12#include <time.h>
13#include <sys/syscall.h>
14
15#include "tst_clocks.h"
16
17int tst_clock_getres(clockid_t clk_id, struct timespec *res)
18{
19 return syscall(SYS_clock_getres, clk_id, res);
20}
21
22int tst_clock_gettime(clockid_t clk_id, struct timespec *ts)
23{
24 return syscall(SYS_clock_gettime, clk_id, ts);
25}
Rafael David Tinoco99ff3b82019-01-29 15:36:52 -020026
27int tst_clock_settime(clockid_t clk_id, struct timespec *ts)
28{
29 return syscall(SYS_clock_settime, clk_id, ts);
30}