BloombergLP::bsls::TimeInterval::TimeInterval

Create a time interval from an explicitly convertible duration.

Synopsis

Declared in <bsls_timeinterval.h>

template<
    class REP_TYPE,
    class PERIOD_TYPE>
constexpr
explicit
TimeInterval(std::chrono::duration<REP_TYPE, PERIOD_TYPE> const& duration)
requires TimeInterval_DurationTraits<
                                   REP_TYPE,
                                   PERIOD_TYPE>::k_EXPLICIT_CONVERSION_ENABLED;

Description

Create a time interval having the value represented by the specified duration when the conversion requires an explicit constructor. See the implicit overload for additional details on behavior and preconditions.

Parameters

NameDescription
durationchrono duration to convert