MCPcopy Index your code
hub / github.com/nodejs/node / msToTimeSpec

Function msToTimeSpec

lib/internal/vfs/stats.js:46–50  ·  view source on GitHub ↗

* Converts milliseconds to seconds and nanoseconds. * @param {number} ms Milliseconds * @returns {{ sec: number, nsec: number }}

(ms)

Source from the content-addressed store, hash-verified

44 * @returns {{ sec: number, nsec: number }}
45 */
46function msToTimeSpec(ms) {
47 const sec = MathFloor(ms / 1000);
48 const nsec = (ms % 1000) * 1_000_000;
49 return { sec, nsec };
50}
51
52/**
53 * Fills the bigint stats array with the given values.

Callers 3

createFileStatsFunction · 0.85
createDirectoryStatsFunction · 0.85
createSymlinkStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…