Duration
public struct Duration
Representation of a time interval.
To create a Duration
you should use any of the following Int
extensions:
- millisecond
- milliseconds
- second
- seconds
- minute
- minutes
- hour
- hours
Example:
let oneMillisecond = 1.millisecond
let twoMilliseconds = 2.milliseconds
let oneSecond = 1.second
let twoSeconds = 2.seconds
let oneMinute = 1.minute
let twoMinutes = 2.minutes
let oneHour = 1.hour
let twoHours = 2.hours