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.
init(rounding timeInterval: TimeInterval, rule: FloatingPointRoundingRule = .toNearestOrAwayFromZero) Parameters
- timeInterval
The
TimeInterval.- rule
The rounding rule to use.