Converts an absl::Duration to a std::chrono::nanoseconds value.
Converts an absl::Duration to any of the pre-defined std::chrono durations. If overflow would occur, the returned value will saturate at the min/max chrono duration value instead.
Example:
absl::Duration d = absl::Microseconds(123); auto x = absl::ToChronoMicroseconds(d); auto y = absl::ToChronoNanoseconds(d); // x == y auto z = absl::ToChronoSeconds(absl::InfiniteDuration()); // z == std::chrono::seconds::max()
The equivalent std::chrono::nanoseconds value.
| Name | Description |
|---|---|
| d | The duration to convert. |