aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/clock.c')
-rw-r--r--sysdeps/unix/sysv/linux/clock.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/clock.c b/sysdeps/unix/sysv/linux/clock.c
index e06c4b328f..e568bf3543 100644
--- a/sysdeps/unix/sysv/linux/clock.c
+++ b/sysdeps/unix/sysv/linux/clock.c
@@ -20,15 +20,14 @@
#include <time.h>
#include <unistd.h>
-#if CLOCKS_PER_SEC != 1000000l
-# error "CLOCKS_PER_SEC should be 1000000"
-#endif
-
clock_t
clock (void)
{
struct timespec ts;
+ _Static_assert (CLOCKS_PER_SEC == 1000000,
+ "CLOCKS_PER_SEC should be 1000000");
+
/* clock_gettime shouldn't fail here since CLOCK_PROCESS_CPUTIME_ID is
supported since 2.6.12. Check the return value anyway in case the kernel
barfs on us for some reason. */