[#absl-Floor]
= xref:absl.adoc[absl]::Floor
:relfileprefix: ../
:mrdocs:

Floors a duration using the passed duration unit to its largest value not greater than the duration&period;

== Synopsis

Declared in `&lt;absl&sol;time&sol;time&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:absl/Duration.adoc[Duration]
Floor(
    xref:absl/Duration.adoc[Duration] d,
    xref:absl/Duration.adoc[Duration] unit);
----

== Description

Example&colon;

absl&colon;&colon;Duration d &equals; absl&colon;&colon;Nanoseconds(123456789)&semi; absl&colon;&colon;Duration b &equals; absl&colon;&colon;Floor(d, absl&colon;&colon;Microseconds(1))&semi; &sol;&sol; 123456us

== Return Value

`d` floored to a multiple of `unit`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *d*
| The duration to floor&period;
| *unit*
| The unit to floor to&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
