Small little helper class for timing and benchmarking things.
import Timer from "timebench";
const timer = new Timer();
veryLongToExecuteFunction();
timer.end();
const times = timer.time();
console.log(times.ns, times.ms, times.s); // Nanoseconds, Milliseconds, and Seconds
Creates a new Timer object and starts it.
Starts the timer, requires for the timer to have been restarted.
Ends the timer, requires for the timer to have been started.
Resets the timer back to 0ns.
Returns nanoseconds, millisecond, and seconds elasped since Timer has been started and ended.
Returns all lapped times with the instantiated Class.
Stores current elapsed in the stored
variable