[#BloombergLP-bsls-TimeInterval-2constructor-002] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/TimeInterval.adoc[TimeInterval]::TimeInterval :relfileprefix: ../../../ :mrdocs: Create a time interval having the value represented by the specified `duration`. Only integer representations of `duration` are supported (i.e. `REP_TYPE` is integer). If the `duration` can be represented _exactly_ by an integer nanoseconds this constructor will be implicit. Otherwise, the constructor will be explicit. The behavior is undefined unless the `duration` can be converted to a valid `TimeInterval` object, whose `seconds` field may have any 64‐bit signed integer value and `nanoseconds` field limited to the range `[ ‐999,999,999..999,999,999 ]`. Note that the current implementation of the lossy conversions (e.g., fractions of a nanosecond) truncates the values towards zero, however this behavior may change without notice in the future, so _do not_ rely on this. == Synopsis Declared in `<bsls_timeinterval.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class REP_TYPE, class PERIOD_TYPE> constexpr TimeInterval( std::chrono::duration<REP_TYPE, PERIOD_TYPE> const& duration, int* = 0) requires TimeInterval_DurationTraits< REP_TYPE, PERIOD_TYPE>::k_IMPLICIT_CONVERSION_ENABLED; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#