[#BloombergLP-balb-LeakyBucket-updateState]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balb.adoc[balb]::xref:BloombergLP/balb/LeakyBucket.adoc[LeakyBucket]::updateState
:relfileprefix: ../../../
:mrdocs:

Set the `lastUpdateTime` of this leaky bucket to the specified `currentTime`&period; If `currentTime` is after `lastUpdateTime`, then update the `unitsInBucket` of this leaky bucket by subtracting from it the number of units drained from `lastUpdateTime` to `currentTime`&period; If `currentTime` is before the `statisticsCollectionStartTime` of this leaky bucket, set `statisticsCollectionStartTime` to `currentTime`&period; The behavior is undefined unless `LLONG&lowbar;MIN !&equals; currentTime&period;seconds()` and the total number of seconds in the time interval resulting from `currentTime &hyphen; lastUpdateTime()` can be represented with a 64&hyphen;bit signed integer&period;

== Synopsis

Declared in `&lt;balb&lowbar;leakybucket&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
updateState(xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& currentTime);
----


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