Time

  • 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
    
    See more

    Declaration

    Swift

    public struct Duration
  • Representation of a deadline.

    To create a Deadline you can either use the static values .immediately and .never or call fromNow() from a previously created Duration.

    Example:

    let deadline = 30.seconds.fromNow()
    
    See more

    Declaration

    Swift

    public struct Deadline
  • Int

    Declaration

    Swift

    struct Int : SignedInteger, Comparable, Equatable