Converts a Duration to an integral count of nanoseconds.
Helper functions that convert a Duration to an integral count of the indicated unit. These return the same results as the IDivDuration() function, though they usually do so more efficiently; see the documentation of IDivDuration() for details about overflow, etc.
Example:
absl::Duration d = absl::Milliseconds(1500); int64_t isec = absl::ToInt64Seconds(d); // isec == 1
The number of whole nanoseconds in d.
| Name | Description |
|---|---|
| d | The duration to convert. |