]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-top-half/musl/include/sys/times.h
Emulate `clock`, `times`, and `getrusage` using the monotonic clock.
[wasi-libc.git] / libc-top-half / musl / include / sys / times.h
index 2256334e2bd72760c01c2abbec0c8c6ebadfc04a..cdaeeee91a9e08cfd3a8d21b0be52a1695afe15a 100644 (file)
@@ -1,3 +1,8 @@
+#ifndef _WASI_EMULATED_PROCESS_CLOCKS
+#error WASI lacks process-associated clocks; to enable emulation of the `times` function using \
+the wall clock, which isn't sensitive to whether the program is running or suspended, \
+compile with -D_WASI_EMULATED_PROCESS_CLOCKS and link with -lwasi-emulated-process-clocks
+#else
 #ifndef        _SYS_TIMES_H
 #define        _SYS_TIMES_H
 
@@ -26,4 +31,4 @@ clock_t times (struct tms *);
 #endif
 
 #endif
-
+#endif