diff options
Diffstat (limited to 'sysdeps/posix/timespec_get.c')
-rw-r--r-- | sysdeps/posix/timespec_get.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sysdeps/posix/timespec_get.c b/sysdeps/posix/timespec_get.c index 1fc18ac648..e3146da2d3 100644 --- a/sysdeps/posix/timespec_get.c +++ b/sysdeps/posix/timespec_get.c @@ -23,16 +23,10 @@ int timespec_get (struct timespec *ts, int base) { - switch (base) + if (base == TIME_UTC) { - case TIME_UTC: - if (__clock_gettime (CLOCK_REALTIME, ts) < 0) - return 0; - break; - - default: - return 0; + __clock_gettime (CLOCK_REALTIME, ts); + return base; } - - return base; + return 0; } |