Contains static methods for time related calculations and parsing
- Source:
Methods
(inner) .difference(a: number, b: number) → Difference
Return a Difference object representing the time difference between a and b
Parameters:
Name | Type | Description |
---|---|---|
a |
|
First time in MS |
b |
|
Second time in MS |
- Source:
(inner) .duration(time: number) → Difference
Return a Difference object (for convenience) measuring the duration of the given MS
Parameters:
Name | Type | Description |
---|---|---|
time |
|
The time in MS |
- Source:
(inner) .parseShorthand(shorthand: string) → number
Parse a duration shorthand string and return the duration in ms
Shorthand examples: 10m, 5h, 1d
Parameters:
Name | Type | Description |
---|---|---|
shorthand |
|
The shorthand to parse |
- Source: