[#BloombergLP-bsls-TimeInterval_DurationTraits]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::TimeInterval&lowbar;DurationTraits
:relfileprefix: ../../
:mrdocs:

Trait metafunction that determines whether the `std&colon;&colon;chrono&colon;&colon;duration&lt;REP, PERIOD&gt;` object can be converted to `bsls&colon;&colon;TimeInterval` either implicitly or explicitly&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class REP,
    class PERIOD&gt;
struct TimeInterval&lowbar;DurationTraits;
----

== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/TimeInterval_DurationTraits/k_EXPLICIT_CONVERSION_ENABLED.adoc[`k&lowbar;EXPLICIT&lowbar;CONVERSION&lowbar;ENABLED`] 
| This compile time constant is `true` if `std&colon;&colon;chrono&colon;&colon;duration&lt;REP, PERIOD&gt;` objects can be explicitly converted to `TimeInterval`, and `false` otherwise&period; This value is intended to be used with `enable&lowbar;if` to enable explicitly converting function overloads&period; Note that this boolean value is mutually exclusive with `k&lowbar;IMPLICIT&lowbar;CONVERION&lowbar;ENABLED` as in they will never be both `true` for the same `REP&quot; and `PERIOD&apos;, but they may be both `false` for floats&period;
| xref:BloombergLP/bsls/TimeInterval_DurationTraits/k_IMPLICIT_CONVERSION_ENABLED.adoc[`k&lowbar;IMPLICIT&lowbar;CONVERSION&lowbar;ENABLED`] 
| This compile time constant is `true` if `std&colon;&colon;chrono&colon;&colon;duration&lt;REP, PERIOD&gt;` objects will be implicitly converted to `TimeInterval`, and `false` otherwise&period; This value is intended to be used with `enable&lowbar;if` to enable implicitly converting function overloads&period; Note that this boolean value is mutually exclusive with `k&lowbar;EXPLICIT&lowbar;CONVERION&lowbar;ENABLED` as in they will never be both `true` for the same `REP&quot; and `PERIOD&apos;, but they may be both `false` for floats&period;
| xref:BloombergLP/bsls/TimeInterval_DurationTraits/k_IS_FLOAT.adoc[`k&lowbar;IS&lowbar;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&period; Otherwise, if the underlying library does not consider `REP` floating point anywhere (see `TimeInterval&lowbar;RepTraits`), `k&lowbar;IS&lowbar;FLOAT` is `false`&period;
| xref:BloombergLP/bsls/TimeInterval_DurationTraits/k_IS_IMPLICIT.adoc[`k&lowbar;IS&lowbar;IMPLICIT`] 
| This compile time constant is `true` if any possible value of an &apos;std&colon;&colon;chrono&colon;&colon;duration&lt;REP, PERIOD&gt; object will be represented by integer nanoseconds (fractions of nanoseconds are not required)&period; Otherwise this value is `false`&period;
|===



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