Operatorswift-nio 2.81.0NIOCore
-(_:_:)
EventLoop.swift:772static func - (lhs: TimeAmount, rhs: TimeAmount) -> TimeAmount
static func - (lhs: TimeAmount, rhs: TimeAmount) -> TimeAmount
import NIOCore
The core abstractions that make up SwiftNIO.
struct TimeAmount
Represents a time interval.
init(_ userProvidedString: String) throws
Creates a TimeAmount from a string representation with an optional default unit.
init(_ duration: Swift.Duration)
static var zero: TimeAmount { get }
The zero value for TimeAmount
.
static func hours(_ amount: Int64) -> TimeAmount
Creates a new TimeAmount
for the given amount of hours.
static func microseconds(_ amount: Int64) -> TimeAmount
Creates a new TimeAmount
for the given amount of microseconds.
static func milliseconds(_ amount: Int64) -> TimeAmount
Creates a new TimeAmount
for the given amount of milliseconds.
static func minutes(_ amount: Int64) -> TimeAmount
Creates a new TimeAmount
for the given amount of minutes.
static func nanoseconds(_ amount: Int64) -> TimeAmount
Creates a new TimeAmount
for the given amount of nanoseconds.
static func seconds(_ amount: Int64) -> TimeAmount
Creates a new TimeAmount
for the given amount of seconds.
var description: String { get }
Returns a human-readable string representation of the time amount using the most appropriate unit
let nanoseconds: Int64
The nanoseconds representation of the TimeAmount
.
static func * <T>(lhs: TimeAmount, rhs: T) -> TimeAmount where T : BinaryInteger
static func * <T>(lhs: T, rhs: TimeAmount) -> TimeAmount where T : BinaryInteger
static func + (lhs: TimeAmount, rhs: TimeAmount) -> TimeAmount
static func += (lhs: inout TimeAmount, rhs: TimeAmount)
static func -= (lhs: inout TimeAmount, rhs: TimeAmount)
static func < (lhs: TimeAmount, rhs: TimeAmount) -> Bool
typealias Value = Int64