Durations Utility
Construct elapsed durations. Existing durations expose their operations as type methods.
Contract Durations · 1.0.0-draft.1
Functions
of
Duration from integer milliseconds/seconds/minutes/hours.
| Argument | Type | Required | Default |
|---|---|---|---|
| amount | core.integer | Yes | — |
| unit | core.string | Yes | — |
Returns: core.duration
Behavior
- Durations measure signed elapsed time, not calendar periods. of accepts an integer amount in milliseconds, seconds, minutes or hours.