TimeAmount

public struct TimeAmount : Equatable

Represents a time interval.

Note

TimeAmount should not be used to represent a point in time.
  • Undocumented

    Declaration

    Swift

    public typealias Value = Int64
  • The nanoseconds representation of the TimeAmount.

    Declaration

    Swift

    public let nanoseconds: Int64
  • Creates a new TimeAmount for the given amount of nanoseconds.

    Declaration

    Swift

    public static func nanoseconds(_ amount: Int64) -> TimeAmount

    Parameters

    amount

    the amount of nanoseconds this TimeAmount represents.

    Return Value

    the TimeAmount for the given amount.

  • Creates a new TimeAmount for the given amount of microseconds.

    Declaration

    Swift

    public static func microseconds(_ amount: Int64) -> TimeAmount

    Parameters

    amount

    the amount of microseconds this TimeAmount represents.

    Return Value

    the TimeAmount for the given amount.

  • Creates a new TimeAmount for the given amount of milliseconds.

    Declaration

    Swift

    public static func milliseconds(_ amount: Int64) -> TimeAmount

    Parameters

    amount

    the amount of milliseconds this TimeAmount represents.

    Return Value

    the TimeAmount for the given amount.

  • Creates a new TimeAmount for the given amount of seconds.

    Declaration

    Swift

    public static func seconds(_ amount: Int64) -> TimeAmount

    Parameters

    amount

    the amount of seconds this TimeAmount represents.

    Return Value

    the TimeAmount for the given amount.

  • Creates a new TimeAmount for the given amount of minutes.

    Declaration

    Swift

    public static func minutes(_ amount: Int64) -> TimeAmount

    Parameters

    amount

    the amount of minutes this TimeAmount represents.

    Return Value

    the TimeAmount for the given amount.

  • Creates a new TimeAmount for the given amount of hours.

    Declaration

    Swift

    public static func hours(_ amount: Int64) -> TimeAmount

    Parameters

    amount

    the amount of hours this TimeAmount represents.

    Return Value

    the TimeAmount for the given amount.

  • Declaration

    Swift

    public static func < (lhs: TimeAmount, rhs: TimeAmount) -> Bool
  • Undocumented

    Declaration

    Swift

    public static func + (lhs: TimeAmount, rhs: TimeAmount) -> TimeAmount
  • Undocumented

    Declaration

    Swift

    public static func - (lhs: TimeAmount, rhs: TimeAmount) -> TimeAmount
  • Undocumented

    Declaration

    Swift

    public static func * <T>(lhs: T, rhs: TimeAmount) -> TimeAmount where T : BinaryInteger
  • Undocumented

    Declaration

    Swift

    public static func * <T>(lhs: TimeAmount, rhs: T) -> TimeAmount where T : BinaryInteger