[#BloombergLP-bdlmt-Throttle-nextPermit]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/Throttle.adoc[Throttle]::nextPermit
:relfileprefix: ../../../
:mrdocs:

Load the earliest time when the specified actions will be permitted&period;

== Synopsis

Declared in `&lt;bdlmt&lowbar;throttle&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
nextPermit(
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval]* result,
    int numActions) const;
----

== Description

Load into the specified `result` the earliest _absolute_ _time_ (according to system clock configured at initialization) when the specified `numActions` will next be permitted&period; Return 0 on success, and a non&hyphen;zero value (with no effect on `result`) if this throttle is configured such that `numActions` will never be permitted (i&period;e&period;, return an error if `numActions &gt; maxSimultaneousActions`) or if `numActions &lt;&equals; 0`&period; The returned `result` is an offset from the epoch of the system clock for which this throttle is configured&period; The behavior is undefined unless this throttle has been initialized (either by calling `initialize` or using a `BDLMT&lowbar;THROTTLE&lowbar;INIT&ast;` macro)&period; Note that `result` may be in the past, and this function does _not_ obtain the current time from the system clock&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *result*
| destination for the next absolute permit time
| *numActions*
| number of actions for which to query
|===


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