@icon-magic/timing
TypeScript icon, indicating that this package has built-in type declarations

2.0.1-beta.0 • Public • Published

@icon-magic/timing

This package handles timing using Node.js' process.hrtime function.

Usage

// Import the timing module module
import { timer } from '@icon-magic/timing';

const TIMER = timer();

function doSomething() {
  TIMER.start();
  /* Something is getting done */
  LOGGER.info(`${TIMER.end()}`);
}

Methods

The timer object has the following methods:

To start the timer:

  • start()

To end the timer, returns elapsed time:

  • end()

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @icon-magic/timing

    Weekly Downloads

    5

    Version

    2.0.1-beta.0

    License

    BSD-2-Clause

    Unpacked Size

    155 kB

    Total Files

    18

    Last publish

    Collaborators

    • thegilby
    • camario25
    • epicmiller
    • rchitloor
    • omayeli