2.0.2 • Published 5 years ago

astimer v2.0.2

Weekly downloads
347
License
MIT
Repository
github
Last release
5 years ago

astimer

Build Status npm Version JS Standard

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.

Links

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.3.0

7 years ago

1.2.0

7 years ago