TimeFrame

public struct TimeFrame
extension TimeFrame: Comparable, Equatable

Represents a duration of time with a specific unit and interval.

  • The unit of time measurement.

    Declaration

    Swift

    public let unit: TimeUnit
  • The number of time units.

    Declaration

    Swift

    public let interval: Int64
  • Gets the amount of seconds approximately equivalent to this TimeFrame.

    Declaration

    Swift

    public func inSeconds() -> Double
  • Gets the amount of milliseconds equivalent to this TimeFrame. Will be coerced to be less than Int64.max

    Declaration

    Swift

    public func inMilliseconds() -> Int64
  • Declaration

    Swift

    public static func < (lhs: `Self`, rhs: `Self`) -> Bool
  • Declaration

    Swift

    public static func == (lhs: `Self`, rhs: `Self`) -> Bool