BloombergLP::bsls::TimeInterval::addInterval

Add seconds and optional nanoseconds to this interval.

Synopsis

Declared in <bsls_timeinterval.h>

TimeInterval&
addInterval(
    bsls::Types::Int64 seconds,
    int nanoseconds = 0);

Description

Add to this time interval the specified integral number of seconds, and the optionally specified integral number of nanoseconds. If unspecified, nanoseconds is 0. Return a reference providing modifiable access to this object. The behavior is undefined unless seconds() + seconds, and the total number of seconds in the resulting time interval, can both be represented with 64-bit signed integers.

Return Value

a reference providing modifiable access to this object

Parameters

NameDescription
secondswhole seconds component
nanosecondsnanoseconds component