[#BloombergLP-bsls-TimeInterval-setInterval] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/TimeInterval.adoc[TimeInterval]::setInterval :relfileprefix: ../../../ :mrdocs: Set this interval from `seconds` and optional `nanoseconds`. == Synopsis Declared in `<bsls_timeinterval.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr void setInterval( xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] seconds, int nanoseconds = 0); ---- == Description Set this time interval to have the value given by the sum of the specified integral number of `seconds`, and the optionally specified integral number of `nanoseconds`. If unspecified, `nanoseconds` is 0. The behavior is undefined unless the total number of seconds in the resulting time interval can be represented with a 64‐bit signed integer (see `isValid`). Note that there is no restriction on the sign or magnitude of either argument except that they must not violate the method's preconditions. == Parameters [cols="1,4"] |=== | Name| Description | *seconds* | whole seconds component | *nanoseconds* | nanoseconds component |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#