diff mbox series

[v3,2/6] lib: add tst_clock_settime() to tst_clocks.h

Message ID 20181212203723.18810-2-rafael.tinoco@linaro.org
State Superseded
Headers show
Series [v3,1/6] tst_timer.h: add tst_timespect_rem_us() function | expand

Commit Message

Rafael David Tinoco Dec. 12, 2018, 8:37 p.m. UTC
Adds tst_clock_settime() function to the lib.

Signed-off-by: Rafael David Tinoco <rafael.tinoco@linaro.org>
---
 include/tst_clocks.h | 2 ++
 lib/tst_clocks.c     | 5 +++++
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/include/tst_clocks.h b/include/tst_clocks.h
index ee2f645c7..90784a3fd 100644
--- a/include/tst_clocks.h
+++ b/include/tst_clocks.h
@@ -26,4 +26,6 @@  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);
+
 #endif /* TST_CLOCKS__ */
diff --git a/lib/tst_clocks.c b/lib/tst_clocks.c
index 87413a339..35798a4aa 100644
--- a/lib/tst_clocks.c
+++ b/lib/tst_clocks.c
@@ -35,3 +35,8 @@  int tst_clock_gettime(clockid_t clk_id, struct timespec *ts)
 {
 	return syscall(SYS_clock_gettime, clk_id, ts);
 }
+
+int tst_clock_settime(clockid_t clk_id, struct timespec *ts)
+{
+	return syscall(SYS_clock_settime, clk_id, ts);
+}