Truncates a duration (toward zero) to a multiple of a non-zero unit.
Example:
absl::Duration d = absl::Nanoseconds(123456789); absl::Duration a = absl::Trunc(d, absl::Microseconds(1)); // 123456us
d truncated toward zero to a multiple of unit.
| Name | Description |
|---|---|
| d | The duration to truncate. |
| unit | The unit to truncate to. |