Protocols
The following protocols are available globally.
-
The
TimeIntervalLiteralsprotocol is used to extendIntegerLiteralTypeandFloatLiteralTypeto allow for human-readable time notations such as:let sixtySeconds = 60.seconds let twoAndAHalfMinutes = 2.5.minutes let oneWeek = 7.days let anotherWeek = 1.weekDefault implementations of the
See moreminutes,hours,days, andweeksproperties are supplied; implementors of theTimeIntervalLiteralsprotocol only need to supply an implementation forseconds.Declaration
Swift
public protocol TimeIntervalLiterals
View on GitHub
Protocols Reference