Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

measure-time

thenativeweb519MITdeprecated5.0.8TypeScript support: included

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

measure-time is a stopwatch.

time

readme

measure-time

measure-time is a stopwatch.

Status

Category Status
Version npm
Dependencies David
Dev dependencies David
Build GitHub Actions
License GitHub

Installation

$ npm install measure-time

Quick start

First you need to add a reference to measure-time to your application.

const { measureTime } = require('measure-time');

If you use TypeScript, use the following code instead:

import { measureTime } from 'measure-time';

Then, call the measureTime function to start measuring time. The function returns another function, getElapsed, that you need to call to get the elapsed time.

const getElapsed = measureTime();

// ...

const elapsed = getElapsed();

console.log(elapsed);
// => {
//      seconds: 3
//      milliseconds: 141,
//      millisecondsTotal: 3141
//    }

Running quality assurance

To run quality assurance for this module use roboter:

$ npx roboter

changelog

5.0.8 (2022-03-25)

Bug Fixes

5.0.7 (2021-08-16)

Bug Fixes

5.0.6 (2021-06-10)

Bug Fixes

  • bump normalize-url from 6.0.0 to 6.0.1 (#286) (fd638ab)

5.0.5 (2021-06-08)

Bug Fixes

  • bump trim-newlines from 3.0.0 to 3.0.1 (#284) (42ba756)

5.0.4 (2021-06-08)

Bug Fixes

  • bump glob-parent from 5.1.1 to 5.1.2 (#285) (1ab741c)

5.0.3 (2021-05-10)

Bug Fixes

  • bump hosted-git-info from 2.8.8 to 2.8.9 (#271) (4bd239c)

5.0.2 (2021-03-25)

Bug Fixes

5.0.1 (2020-11-03)

Bug Fixes

  • Fix headline for robot section in readme. (#173) (82dc91b)