[#BloombergLP-bsls-TimeInterval_DurationTraits] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::TimeInterval_DurationTraits :relfileprefix: ../../ :mrdocs: Trait metafunction that determines whether the `std::chrono::duration<REP, PERIOD>` object can be converted to `bsls::TimeInterval` either implicitly or explicitly. == Synopsis Declared in `<bsls_timeinterval.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class REP, class PERIOD> struct TimeInterval_DurationTraits; ---- == Static Data Members [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/TimeInterval_DurationTraits/k_EXPLICIT_CONVERSION_ENABLED.adoc[`k_EXPLICIT_CONVERSION_ENABLED`] | This compile time constant is `true` if `std::chrono::duration<REP, PERIOD>` objects can be explicitly converted to `TimeInterval`, and `false` otherwise. This value is intended to be used with `enable_if` to enable explicitly converting function overloads. Note that this boolean value is mutually exclusive with `k_IMPLICIT_CONVERION_ENABLED` as in they will never be both `true` for the same `REP" and `PERIOD', but they may be both `false` for floats. | xref:BloombergLP/bsls/TimeInterval_DurationTraits/k_IMPLICIT_CONVERSION_ENABLED.adoc[`k_IMPLICIT_CONVERSION_ENABLED`] | This compile time constant is `true` if `std::chrono::duration<REP, PERIOD>` objects will be implicitly converted to `TimeInterval`, and `false` otherwise. This value is intended to be used with `enable_if` to enable implicitly converting function overloads. Note that this boolean value is mutually exclusive with `k_EXPLICIT_CONVERION_ENABLED` as in they will never be both `true` for the same `REP" and `PERIOD', but they may be both `false` for floats. | xref:BloombergLP/bsls/TimeInterval_DurationTraits/k_IS_FLOAT.adoc[`k_IS_FLOAT`] | This compile time constant is `true` if the `REP` (template type argument) is indicated to be a floating point type by the underlying library. Otherwise, if the underlying library does not consider `REP` floating point anywhere (see `TimeInterval_RepTraits`), `k_IS_FLOAT` is `false`. | xref:BloombergLP/bsls/TimeInterval_DurationTraits/k_IS_IMPLICIT.adoc[`k_IS_IMPLICIT`] | This compile time constant is `true` if any possible value of an 'std::chrono::duration<REP, PERIOD> object will be represented by integer nanoseconds (fractions of nanoseconds are not required). Otherwise this value is `false`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#