The C standard requires CLOCKS_PER_SEC to have type clock_t.
#define CLD_TRAPPED 4
#define CLNEXT CTRL('v')
#define CLOCAL 0004000
-#define CLOCKS_PER_SEC (1000000000)
+#define CLOCKS_PER_SEC ((clock_t)1000000000)
#define CLOCK_MONOTONIC (&_CLOCK_MONOTONIC)
#define CLOCK_PROCESS_CPUTIME_ID (&_CLOCK_PROCESS_CPUTIME_ID)
#define CLOCK_REALTIME (&_CLOCK_REALTIME)
#define TIME_UTC __WASI_CLOCK_REALTIME
-/* FIXME: POSIX requires this to be 1000000, and that's what glibc and musl use. */
-#define CLOCKS_PER_SEC (1000000000)
+/*
+ * Note that XSI specifies CLOCKS_PER_SEC to be 1000000, rather than
+ * 1000000000; the clock API is providing more precision than XSI specifies.
+ */
+#define CLOCKS_PER_SEC ((clock_t)1000000000)
#endif