Create a simple duration reporter.
Returns a function that, when called, reports the elapsed time since duration() was called. The returned string is formatted via formatMilliseconds.
duration()
formatMilliseconds
Example: const t = duration(); // do work...; console.log(t());
a zero-argument function that returns the elapsed time string
Create a simple duration reporter.
Returns a function that, when called, reports the elapsed time since
duration()was called. The returned string is formatted viaformatMilliseconds.Example: const t = duration(); // do work...; console.log(t());