[#BloombergLP-balb-RateLimiter-calculateTimeToSubmit]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balb.adoc[balb]::xref:BloombergLP/balb/RateLimiter.adoc[RateLimiter]::calculateTimeToSubmit
:relfileprefix: ../../../
:mrdocs:

Update the state of this rate limiter to the specified `currentTime`&period; Return the estimated time interval that should pass from `currentTime` until 1 more unit can be submitted to this rate limiter without exceeding its configured limits&period; The number of nanoseconds in the returned time interval is rounded up&period; Note that a time interval of 0 is returned if 1 or more units can be submitted at `currentTime`&period; Also note that after waiting for the returned time interval, clients should typically check again using this method, because additional units may have been submitted in the interim&period;

== Synopsis

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

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


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