[#BloombergLP-bsls-TimeInterval-2constructor-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/TimeInterval.adoc[TimeInterval]::TimeInterval
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

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

Create a time interval having the value of 0 seconds and 0 nanoseconds&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:BloombergLP/bsls/TimeInterval/2constructor-06.adoc[TimeInterval]();
----

[.small]#xref:BloombergLP/bsls/TimeInterval/2constructor-06.adoc[_» more&period;&period;&period;_]#

Create a time interval from a real number of `seconds`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bsls/TimeInterval/2constructor-009.adoc[TimeInterval](double seconds);
----

[.small]#xref:BloombergLP/bsls/TimeInterval/2constructor-009.adoc[_» more&period;&period;&period;_]#

Create a time interval from an implicitly convertible `duration`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class REP&lowbar;TYPE,
    class PERIOD&lowbar;TYPE&gt;
constexpr
xref:BloombergLP/bsls/TimeInterval/2constructor-002.adoc[TimeInterval](std::chrono::duration&lt;REP&lowbar;TYPE, PERIOD&lowbar;TYPE&gt; const& duration)
requires TimeInterval&lowbar;DurationTraits&lt;
                                   REP&lowbar;TYPE,
                                   PERIOD&lowbar;TYPE&gt;&colon;&colon;k&lowbar;IMPLICIT&lowbar;CONVERSION&lowbar;ENABLED;
----

[.small]#xref:BloombergLP/bsls/TimeInterval/2constructor-002.adoc[_» more&period;&period;&period;_]#

Create a time interval from an explicitly convertible `duration`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class REP&lowbar;TYPE,
    class PERIOD&lowbar;TYPE&gt;
constexpr
explicit
xref:BloombergLP/bsls/TimeInterval/2constructor-07.adoc[TimeInterval](std::chrono::duration&lt;REP&lowbar;TYPE, PERIOD&lowbar;TYPE&gt; const& duration)
requires TimeInterval&lowbar;DurationTraits&lt;
                                   REP&lowbar;TYPE,
                                   PERIOD&lowbar;TYPE&gt;&colon;&colon;k&lowbar;EXPLICIT&lowbar;CONVERSION&lowbar;ENABLED;
----

[.small]#xref:BloombergLP/bsls/TimeInterval/2constructor-07.adoc[_» more&period;&period;&period;_]#

Create a time interval from `seconds` and `nanoseconds`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:BloombergLP/bsls/TimeInterval/2constructor-000.adoc[TimeInterval](
    xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64] seconds,
    int nanoseconds);
----

[.small]#xref:BloombergLP/bsls/TimeInterval/2constructor-000.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *seconds*
| interval length in seconds
| *duration*
| chrono duration to convert
| *nanoseconds*
| nanoseconds component
|===


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