MCPcopy Create free account
hub / github.com/react-static/react-static / timeEnd

Function timeEnd

packages/react-static/src/utils/index.js:24–41  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

22 times[message] = performance.now() / 1000
23}
24export function timeEnd(message) {
25 if (times[message]) {
26 let seconds = (performance.now() / 1000 - times[message]) * 10
27 times[message] = null
28
29 if (seconds < 0.1) {
30 console.log(`${message}`)
31 return
32 }
33
34 if (seconds < 1) {
35 seconds = Math.round(seconds * 10) / 10
36 } else {
37 seconds = Math.round(seconds) / 10
38 }
39 console.log(`${message} (${seconds}s)`)
40 }
41}
42
43export function debounce(func, wait, immediate) {
44 let timeout

Callers 11

buildHTMLFunction · 0.90
cleanDistDirectoryFunction · 0.90
fetchRoutes.jsFile · 0.90
fetchSiteData.jsFile · 0.90
copyPublicFolderFunction · 0.90
getRoutesFunction · 0.90
runExpressServerFunction · 0.90
buildProductionBundlesFunction · 0.90
create.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…