MCPcopy Create free account
hub / github.com/ByBrawe/opencode-loop / sleep

Function sleep

scripts/loopd.mjs:36–38  ·  view source on GitHub ↗
(ms)

Source from the content-addressed store, hash-verified

34 const n = Number(m[1])
35 const unit = m[2]
36
37 if (unit === "ms") return n
38 if (unit.startsWith("s")) return n * 1000
39 if (unit.startsWith("m")) return n * 60_000
40 if (unit.startsWith("h")) return n * 3_600_000
41 if (unit.startsWith("d")) return n * 86_400_000

Callers 1

daemonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected