1.4.3 • Published 1 year ago

stopwatsch v1.4.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

npm version

Stopwatsch

A simple light weight JavaScript Stopwatch

Installation

To install and set up the library, run:

$ npm install stopwatsch

Getting Started

import stopwatsh from 'stopwatsch';

stopwatsh.start()
setTimeout(() => console.log(stopwatsh.time), 1000) // ≈ 1000

methods

#start()

stopwatsh.start()

Starts the stopwatch

#stop()

stopwatsh.stop()
stopwatsh.pause()

Stops the stopwatch

#restart()

stopwatsh.restart()

Restarts the stopwatch

properties

#milliseconds

stopwatsh.time
stopwatsh.ms
stopwatsh.milliseconds

The elapsed time in milliseconds

#seconds

stopwatsh.s
stopwatsh.sec
stopwatsh.seconds

The elapsed time in seconds

#minutes

stopwatsh.m
stopwatsh.min
stopwatsh.minutes

The elapsed time in minutes

#hours

stopwatsh.h
stopwatsh.hours

The elapsed time in hours

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago