File wavm/timing.cpp

namespace wasm

SYSCALL NUMBERING

Have a look in the sysroot at include/bits/syscall.h to determine the system call numbering.

Functions

void timingLink()
I32 s__clock_gettime(I32 clockId, I32 timespecPtr)
I32 s__gettimeofday(int tvPtr, int tzPtr)

As specified in the gettimeofday man page, use of the timezone struct is obsolete and hence not supported here

I32 s__nanosleep(I32 reqPtr, I32 remPtr)

Allow sleep for now

WAVM_DEFINE_INTRINSIC_FUNCTION (wasi, "poll_oneoff", I32, wasi_poll_oneoff, I32 subscriptionsPtr, I32 eventsPtr, I32 nSubs, I32 resNEvents)
WAVM_DEFINE_INTRINSIC_FUNCTION (env, "utime", I32, s__utime, I32 a, I32 b)
WAVM_DEFINE_INTRINSIC_FUNCTION (wasi, "clock_time_get", I32, wasi_clock_time_get, I32 clockId, I64 precision, I32 resultPtr)
WAVM_DEFINE_INTRINSIC_FUNCTION (wasi, "clock_res_get", I32, wasi_clock_res_get, I32 a, I32 b)