Represents a time delay with a specific value and unit TimeUnits.

The Delay class allows for creating and manipulating time delay representations using various time units from nanoseconds to hours.

// Create delays using different time units
const shortDelay = new Delay(500, TimeUnits.MILLISECONDS);
const longDelay = new Delay(2, TimeUnits.HOURS);

console.log(shortDelay.toString()); // Outputs: "500ms"
console.log(longDelay.toString()); // Outputs: "2h"

Constructors

Properties

Methods

Constructors

Properties

unit: TimeUnits
value: number

Methods