[#absl-Nanoseconds-05]
= xref:absl.adoc[absl]::Nanoseconds
:relfileprefix: ../
:mrdocs:

Constructs a `Duration` from a floating&hyphen;point number of nanoseconds&period;

== Synopsis

Declared in `&lt;absl&sol;time&sol;time&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename T,
    &sol;&ast; implementation-defined &ast;&sol; = 0&gt;
xref:absl/Duration.adoc[Duration]
Nanoseconds(T n);
----

== Description

Factory overloads for constructing `Duration` values from a floating&hyphen;point number of the unit indicated by the factory function&apos;s name&period; These functions exist for convenience, but they are not as efficient as the integral factories, which should be preferred&period;

Example&colon;

auto a &equals; absl&colon;&colon;Seconds(1&period;5)&semi; &sol;&sol; OK auto b &equals; absl&colon;&colon;Milliseconds(1500)&semi; &sol;&sol; BETTER

== Return Value

A duration of `n` nanoseconds&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *n*
| The number of nanoseconds&period;
|===


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