Floors a duration using the passed duration unit to its largest value not greater than the duration.
Example:
absl::Duration d = absl::Nanoseconds(123456789); absl::Duration b = absl::Floor(d, absl::Microseconds(1)); // 123456us
d floored to a multiple of unit.
| Name | Description |
|---|---|
| d | The duration to floor. |
| unit | The unit to floor to. |