[#absl-Nanoseconds-05] = xref:absl.adoc[absl]::Nanoseconds :relfileprefix: ../ :mrdocs: Constructs a `Duration` from a floating‐point number of nanoseconds. == Synopsis Declared in `<absl/time/time.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename T, /* implementation-defined */ = 0> xref:absl/Duration.adoc[Duration] Nanoseconds(T n); ---- == Description Factory overloads for constructing `Duration` values from a floating‐point number of the unit indicated by the factory function's name. These functions exist for convenience, but they are not as efficient as the integral factories, which should be preferred. Example: auto a = absl::Seconds(1.5); // OK auto b = absl::Milliseconds(1500); // BETTER == Return Value A duration of `n` nanoseconds. == Parameters [cols="1,4"] |=== | Name| Description | *n* | The number of nanoseconds. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#