measure-time
TypeScript icon, indicating that this package has built-in type declarations

5.0.8 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i measure-time

Weekly Downloads

67

Version

5.0.8

License

MIT

Unpacked Size

8.71 kB

Total Files

12

Last publish

Collaborators

  • thenativeweb-admin
  • goloroden