Skip to content

xcfio/CoolCake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoolCake

A simple package that monitor server running time

Installation

To install CoolCake, run one of the following commands based on your preferred package manager:

NPM

npm install coolcake

PNPM

pnpm add coolcake

Yarn

yarn add coolcake

Uses

For ESM

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)

For CommonJS

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)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published