uptime command
This commit is contained in:
parent
9f5b003bb7
commit
282fb79f36
10
app/nose/bin/uptime.ts
Normal file
10
app/nose/bin/uptime.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { NOSE_STARTED } from "@/config"
|
||||
|
||||
export default function () {
|
||||
const ms = Date.now() - NOSE_STARTED
|
||||
const sec = Math.floor(ms / 1000)
|
||||
const min = Math.floor(sec / 60)
|
||||
const hrs = Math.floor(min / 60)
|
||||
|
||||
return `${hrs}h ${min % 60}m ${sec % 60}s`
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user