MCPcopy Create free account
hub / github.com/Lumon-Industries/Macrodata-Refinement / createTimeString

Function createTimeString

utils.js:27–32  ·  view source on GitHub ↗
(seconds)

Source from the content-addressed store, hash-verified

25}
26// Takes a value in seconds, returns hh:mm:ss:ms
27const createTimeString = (seconds) => {
28 const baseString = new Date(seconds * 1000).toISOString().substring(11, 23);
29 const hhmm = baseString.split(':');
30 const ssms = hhmm[2].split('.');
31 return `${hhmm[0]}h ${hhmm[1]}m ${ssms[0]}s ${ssms[1]}ms`;
32}

Callers 1

setupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected