Stopwatch-timer npm i stopwatch-timer Keep track of time. const stopwatch = require("stopwatch"); stopwatch.start(); stopwatch.stop(); let time = stopwatch.getTime(); The time variable is now an integer with the time(seconds) elapsed since the stopwatch was started.