Time
-
Representation of a time interval.
To create a
Duration
you should use any of the followingInt
extensions:- millisecond
- milliseconds
- second
- seconds
- minute
- minutes
- hour
- hours
Example:
See morelet 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
Declaration
Swift
public struct Duration
-
Declaration
Swift
struct Int : SignedInteger, Comparable, Equatable