A simple package that monitor server running time
To install CoolCake, run one of the following commands based on your preferred package manager:
npm install coolcake
pnpm add coolcake
yarn add coolcake
import { uptime, UptimeFormat } from "coolcake"
setTimeout(() => {
console.log(uptime()) // return 1 second 2 milliseconds
console.log(uptime(UptimeFormat.Long)) // return 1 second 2 milliseconds
console.log(uptime(UptimeFormat.Short)) //return 1s 2ms
}, 1200)
const { uptime, UptimeFormat } = require("coolcake")
setTimeout(() => {
console.log(uptime()) // return 1 second 2 milliseconds
console.log(uptime(UptimeFormat.Long)) // return 1 second 2 milliseconds
console.log(uptime(UptimeFormat.Short)) //return 1s 2ms
}, 1200)