MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / modMilliseconds

Function modMilliseconds

xs/sources/xsPlatforms.c:426–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424
425#if mxWindows || mxMacOSX || mxLinux || mxWasm
426uint32_t modMilliseconds()
427{
428 c_timeval tv;
429 c_gettimeofday(&tv, NULL);
430// #if (mxWasm || mxWindows || mxMacOSX)
431 return (uint32_t)(uint64_t)(((double)(tv.tv_sec) * 1000.0) + ((double)(tv.tv_usec) / 1000.0));
432// #else
433// return (uint32_t)(((double)(tv.tv_sec) * 1000.0) + ((double)(tv.tv_usec) / 1000.0));
434// #endif
435}
436#endif
437
438#if mxWindows

Callers 15

destm32sWait_2g1rFunction · 0.85
readSensorFunction · 0.85
modTimersExecuteFunction · 0.85
modTimersNextFunction · 0.85
modTimerAddFunction · 0.85
modTimerRescheduleFunction · 0.85
modTimersExecuteFunction · 0.85
modTimersNextFunction · 0.85
modTimerAddFunction · 0.85
modTimerRescheduleFunction · 0.85
xs_time_ticksFunction · 0.85
xs_time_deltaFunction · 0.85

Calls 1

c_gettimeofdayFunction · 0.85

Tested by

no test coverage detected