Converts a Duration to a floating‐point count of nanoseconds.
Synopsis
Declared in <absl/time/time.h>
double
ToDoubleNanoseconds(Duration d);
Description
Helper functions that convert a Duration to a floating point count of the indicated unit. These functions are shorthand for the FDivDuration() function above; see its documentation for details about overflow, etc.
Example:
absl::Duration d = absl::Milliseconds(1500); double dsec = absl::ToDoubleSeconds(d); // dsec == 1.5
Return Value
The number of nanoseconds in d, including any fraction.
Parameters
Name |
Description |
d |
The duration to convert. |
Created with MrDocs