[#absl-Nanoseconds-0a] = xref:absl.adoc[absl]::Nanoseconds :relfileprefix: ../ :mrdocs: Constructs a `Duration` from an integral number of nanoseconds. == Synopsis Declared in `<absl/time/time.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename T, /* implementation-defined */ = 0> constexpr xref:absl/Duration.adoc[Duration] Nanoseconds(T n); ---- == Description Factory functions for constructing `Duration` values from an integral number of the unit indicated by the factory function's name. The number must be representable as int64_t. NOTE: no "Days()" factory function exists because "a day" is ambiguous. Civil days are not always 24 hours long, and a 24‐hour duration often does not correspond with a civil day. If a 24‐hour duration is needed, use `absl::Hours(24)`. If you actually want a civil day, use absl::CivilDay from civil_time.h. Example: absl::Duration a = absl::Seconds(60); absl::Duration b = absl::Minutes(1); // b == a == 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]#