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