diff options
Diffstat (limited to 'src/kernel/tests/include/tst_clocks.h')
-rw-r--r-- | src/kernel/tests/include/tst_clocks.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/kernel/tests/include/tst_clocks.h b/src/kernel/tests/include/tst_clocks.h new file mode 100644 index 0000000..80030c6 --- /dev/null +++ b/src/kernel/tests/include/tst_clocks.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright (c) 2017 Cyril Hrubis <chrubis@suse.cz> + */ + +/* + * clock_gettime() and clock_getres() functions + */ + +#ifndef TST_CLOCKS__ +#define TST_CLOCKS__ + +int tst_clock_getres(clockid_t clk_id, struct timespec *res); + +int tst_clock_gettime(clockid_t clk_id, struct timespec *ts); + +int tst_clock_settime(clockid_t clk_id, struct timespec *ts); + +/* + * Converts clock id to a readable name. + */ +const char *tst_clock_name(clockid_t clk_id); + +#endif /* TST_CLOCKS__ */ |