MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / timespec_to_ms

Function timespec_to_ms

system/lib/wasmfs/syscalls.cpp:1124–1132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1122}
1123
1124static double timespec_to_ms(timespec ts) {
1125 if (ts.tv_nsec == UTIME_OMIT) {
1126 return INFINITY;
1127 }
1128 if (ts.tv_nsec == UTIME_NOW) {
1129 return emscripten_date_now();
1130 }
1131 return double(ts.tv_sec) * 1000 + double(ts.tv_nsec) / (1000 * 1000);
1132}
1133
1134// TODO: Test this with non-AT_FDCWD values.
1135int __syscall_utimensat(int dirfd,

Callers 1

__syscall_utimensatFunction · 0.85

Calls 1

emscripten_date_nowFunction · 0.85

Tested by

no test coverage detected