Returns elapsed time since the initial call.
// Record startconst elapsed = Stopwatch.since();// Get elapsed time in millis// since Elapsed.since()elapsed(); // Yields number Copy
// Record startconst elapsed = Stopwatch.since();// Get elapsed time in millis// since Elapsed.since()elapsed(); // Yields number
If you want to initialise a stopwatch, but not yet start it, consider:
// Initlet state = { clicked: Stopwatch.infinity()};state.click(); // Returns a giant value// Later, when click happens:state = { click: Stopwatch.since() } Copy
// Initlet state = { clicked: Stopwatch.infinity()};state.click(); // Returns a giant value// Later, when click happens:state = { click: Stopwatch.since() }
See also:
Returns elapsed time since the initial call.
If you want to initialise a stopwatch, but not yet start it, consider:
See also: