MCPcopy
hub / github.com/GitbookIO/gitbook / time

Function time

lib/utils/timing.js:49–55  ·  view source on GitHub ↗

Return a milliseconds number as a second string @param {Number} ms @return {String}

(ms)

Source from the content-addressed store, hash-verified

47 @return {String}
48*/
49function time(ms) {
50 if (ms < 1000) {
51 return (ms.toFixed(0)) + 'ms';
52 }
53
54 return (ms/1000).toFixed(2) + 's';
55}
56
57/**
58 Dump all timers to a logger

Callers 1

dumpFunction · 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…