Skip to content

Utility for microsecond precision timestamp conversion

License

Notifications You must be signed in to change notification settings

coinpit/microtime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

microtime.js

Convert between micro, milli, second, minutes

Usage

var time = require('microtime.js')
var now = time.micro()
var nowMilli = Date.now()

console.log(now) 
1462394459286762
console.log(time.microToMilli(now))
console.log(time.microToMin(now))
console.log(time.milliToMicro(nowMilli))
console.log(time.secToMicro(time.microToSec(now)))
// ... and so on

unix timestamp 30 sec into future

console.log(time.secondsAfterNow(30))

About

Utility for microsecond precision timestamp conversion

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published