1 #define _WASI_EMULATED_PROCESS_CLOCKS
5 #include <common/time.h>
8 CLOCKS_PER_SEC
== NSEC_PER_SEC
,
9 "This implementation assumes that `clock` is in nanoseconds"
12 clock_t __clock(void);
14 clock_t times(struct tms
*buffer
) {
15 __wasi_timestamp_t user
= __clock();
16 *buffer
= (struct tms
){
21 __wasi_timestamp_t realtime
= 0;
22 (void)__wasi_clock_time_get(__WASI_CLOCKID_MONOTONIC
, 0, &realtime
);