Creates a new stopwatch instance.
const w = stopwatch();w.start();await sleep(1000);console.log(w.elapsed()); // 1000 Copy
const w = stopwatch();w.start();await sleep(1000);console.log(w.elapsed()); // 1000
Creates a new stopwatch instance.