Skip to content

@web-engine-dev/time


@web-engine-dev/time / createStopwatch

Function: createStopwatch()

createStopwatch(): Stopwatch

Creates a new stopwatch instance

Returns

Stopwatch

Example

typescript
const stopwatch = createStopwatch();
stopwatch.start();
// ... perform work ...
stopwatch.stop();
console.log(`Elapsed: ${stopwatch.elapsedSeconds()}s`);

Proprietary software. All rights reserved.