1 #include <time.h> 2 #include "syscall.h" 3 #ifdef __EMSCRIPTEN__ 4 #include <errno.h> 5 #endif 6 clock_settime(clockid_t clk,const struct timespec * ts)7int clock_settime(clockid_t clk, const struct timespec *ts) 8 { 9 #ifdef __EMSCRIPTEN__ 10 // JS and wasm VMs do not allow setting the time. 11 errno = EPERM; 12 return -1; 13 #else 14 return syscall(SYS_clock_settime, clk, ts); 15 #endif 16 } 17