How to get a timestamp (or tick count) in a WASM module?

Is there a method to get a timestamp or tick-count in a WASM module
(standalone) to millisecond resolution? I get a runtime error when trying to
use clock():

WASM: Error ERR_ILLEGAL_C_IMPORT: env:clock is not a whitelisted C import, nor a valid webassembly import.

and GetTickCount() doesn’t seem to be available either. Thanks in Advance.

Use the simulator seconds counter… Raul

Try this: auto now_miliseconds =
std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count();

Works perfectly - thanks!

Need milliseconds…