]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Add clock_getres and clock_settime stubs
authorVlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@stud.acs.upb.ro>
Tue, 3 Sep 2019 12:21:50 +0000 (12:21 +0000)
committerCostin Lupu <costin.lupu@cs.pub.ro>
Tue, 3 Sep 2019 17:30:05 +0000 (20:30 +0300)
Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
Reviewed-by: Costin Lupu <costin.lupu@cs.pub.ro>
time.c

diff --git a/time.c b/time.c
index 94e8097bd6484ec5e8bd4c4fe0ff138afefd0fac..a79691cb43fcd535c05f0d9ecd84a766684280d1 100644 (file)
--- a/time.c
+++ b/time.c
@@ -137,6 +137,11 @@ unsigned int sleep(unsigned int seconds)
        return 0;
 }
 
+int clock_getres(clockid_t clk_id __unused, struct timespec *res __unused)
+{
+       return 0;
+}
+
 int clock_gettime(clockid_t clk_id __unused, struct timespec *tp __unused)
 {
        __nsec now;
@@ -162,3 +167,8 @@ int clock_gettime(clockid_t clk_id __unused, struct timespec *tp __unused)
        tp->tv_nsec = ukarch_time_subsec(now);
        return 0;
 }
+
+int clock_settime(clockid_t clk_id __unused, const struct timespec *tp __unused)
+{
+       return 0;
+}