init(rounding:rule:)

Creates a new Google_Protobuf_Duration that is equal to the given TimeInterval (measured in seconds), rounded to the nearest nanosecond according to the given rounding rule.

Google_Protobuf_Duration+Extensions.swift:181
init(rounding timeInterval: TimeInterval, rule: FloatingPointRoundingRule = .toNearestOrAwayFromZero)

Parameters

timeInterval

The TimeInterval.

rule

The rounding rule to use.