Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-simple-timer

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-simple-timer

A bare-bones timer for JavaScript - implemented in TypeScript.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-simple-timer

A bare-bones timer for JavaScript - implemented in TypeScript.

Installation:

$ npm install node-simple-timer
or
$ yarn add node-simple-timer

Usage:


import {Timer} from 'node-simple-timer';

const timer = new Timer();
timer.start();

// Do something

let ms = timer.milliseconds();

// Do something else:

ms = timer.milliseconds();

// One last thing

timer.end();
ms = timer.milliseconds();

console.log('Total seconds: ', timer.seconds();
Start a Timer at construction time.
const timer = new Timer(true);  // Starts at construction time
Chaining methods:
const timer = new Timer();

timer.start();
const ns = timer.end().nanoseconds();

FAQs

Package last updated on 01 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc