Licence
MIT
Version
2.0.2
Deps
3
Size
11 kB
Vulns
1
Weekly
0
astimer
Async timer
Installation
$ npm install astimer --save
Usage
'use strict'
const astimer = require('astimer')
async function tryExample () {
let timer = astimer()
// Start measuring
timer.tick()
// Do something async
/* ... */
// Get took time from last tick
let took = timer.tick()
console.log(`Time took: ${took}ms`) // show time from last tick
}
tryExample()
License
This software is released under the MIT License.