[#util-TokenBucket-decrement]
= xref:util.adoc[util]::xref:util/TokenBucket.adoc[TokenBucket]::decrement
:relfileprefix: ../../
:mrdocs:

Consume n tokens&period; Returns false if the balance dropped to&sol;below the given floor&period;

== Synopsis

Declared in `&lt;util&sol;tokenbucket&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
decrement(
    double n = 1&period;0,
    double floor = 0&period;0);
----

== Return Value

true if the remaining balance is still above floor&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *n*
| The number of tokens to consume&period;
| *floor*
| The balance threshold below which consumption is reported as failed&period;
|===


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