NIODeadline
public struct NIODeadline : Equatable, Hashable
Represents a point in time.
Stores the time in nanoseconds as returned by DispatchTime.now().uptimeNanoseconds
NIODeadline
allow chaining multiple tasks with the same deadline without needing to
compute new timeouts for each step
func doSomething(deadline: NIODeadline) -> EventLoopFuture<Void> {
return step1(deadline: deadline).flatMap {
step2(deadline: deadline)
}
}
doSomething(deadline: .now() + .seconds(5))
Note
NIODeadline
should not be used to represent a time interval
-
Undocumented
Declaration
Swift
public typealias Value = UInt64
-
The nanoseconds since boot representation of the
NIODeadline
.Declaration
Swift
public var uptimeNanoseconds: UInt64 { get }
-
Undocumented
Declaration
Swift
public static let distantPast: NIODeadline
-
Undocumented
Declaration
Swift
public static let distantFuture: NIODeadline
-
Undocumented
Declaration
Swift
public static func now() -> NIODeadline
-
Undocumented
Declaration
Swift
public static func uptimeNanoseconds(_ nanoseconds: UInt64) -> NIODeadline
-
Declaration
Swift
public static func < (lhs: NIODeadline, rhs: NIODeadline) -> Bool
-
Declaration
Swift
public static func > (lhs: NIODeadline, rhs: NIODeadline) -> Bool
-
Declaration
Swift
public var description: String { get }
-
Undocumented
Declaration
Swift
public static func - (lhs: NIODeadline, rhs: NIODeadline) -> TimeAmount
-
Undocumented
Declaration
Swift
public static func + (lhs: NIODeadline, rhs: TimeAmount) -> NIODeadline
-
Undocumented
Declaration
Swift
public static func - (lhs: NIODeadline, rhs: TimeAmount) -> NIODeadline