[#BloombergLP-bsls-TimeInterval-addDuration]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/TimeInterval.adoc[TimeInterval]::addDuration
:relfileprefix: ../../../
:mrdocs:

Add to this time interval the specified `duration`&period; Return a reference providing modifiable access to this object&period; The behavior is undefined unless the `duration` can be converted to a valid `TimeInterval` object, whose `seconds` field may have any 64&hyphen;bit signed integer value and `nanoseconds` field limited to the range `&lsqb; &hyphen;999,999,999&period;&period;999,999,999 &rsqb;`&period; Also the behavior is undefined unless the total number of seconds in the resulting time interval can be represented with 64&hyphen;bit signed integer&period; Note that this operation is allowed only if representation type of the `duration` is not a floating point type and the `duration` itself can be _exactly_ represented by an integer nanoseconds&period;

== Synopsis

Declared in `&lt;bsls&lowbar;timeinterval&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class REP&lowbar;TYPE,
    class PERIOD&lowbar;TYPE&gt;
constexpr
xref:BloombergLP/bsls/TimeInterval.adoc[TimeInterval]&
addDuration(
    std::chrono::duration&lt;REP&lowbar;TYPE, PERIOD&lowbar;TYPE&gt; const& duration,
    int* = 0)
requires TimeInterval&lowbar;DurationTraits&lt;REP&lowbar;TYPE, PERIOD&lowbar;TYPE&gt;&colon;&colon;
                                                 k&lowbar;IMPLICIT&lowbar;CONVERSION&lowbar;ENABLED;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
