[#BloombergLP-bdlmt-Throttle-requestPermission-0da]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/Throttle.adoc[Throttle]::requestPermission
:relfileprefix: ../../../
:mrdocs:

`requestPermission` overloads

== Synopses

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

Return `true` if the time debt incurred by taking the indicated action(s) would _not_ exceed the maximum allowed time debt configured for this `Throttle` object (`nanosecondsPerAction &ast; maxSimultaneousActions`), and `false` otherwise&period; Optionally specify `now` indicating the current time of the system clock for which this object is configured (`now` is a offset from that clocks epoch)&period; If `now` is not supplied, the current time is obtained from the configured system clock&period; Optionally specify `numActions` indicating the number of actions requested&period; If `numActions` is not supplied, one action is requested&period; If this function returns `true` then `numActions &ast; nanosecondsPerAction` is added to the time debt accumulated by this component&period; The behavior is undefined unless this throttle has been initialized (either by calling an overload of `initialize` or using one of the `BDLMT&lowbar;THROTTLE&lowbar;INIT&ast;` macros), `0 &lt; numActions`, (`numActions &lt;&equals; maxSimultaneousActions` or `0 &equals;&equals; maxSimultaneousActions`), and the value of `now`, if specified, can be expressed in nanoseconds as a 64&hyphen;bit signed integer&period; Note that `requestPermissionIfValid`, unlike these methods, does not have any preconditions on the value of `numActions`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:BloombergLP/bdlmt/Throttle/requestPermission-0db.adoc[requestPermission]();
----

[.small]#xref:BloombergLP/bdlmt/Throttle/requestPermission-0db.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, for the specified `numActions`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:BloombergLP/bdlmt/Throttle/requestPermission-07.adoc[requestPermission](int numActions);
----

[.small]#xref:BloombergLP/bdlmt/Throttle/requestPermission-07.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, using the specified `now`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:BloombergLP/bdlmt/Throttle/requestPermission-0a.adoc[requestPermission](xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& now);
----

[.small]#xref:BloombergLP/bdlmt/Throttle/requestPermission-0a.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, using the specified `now`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:BloombergLP/bdlmt/Throttle/requestPermission-0b.adoc[requestPermission](
    int numActions,
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& now);
----

[.small]#xref:BloombergLP/bdlmt/Throttle/requestPermission-0b.adoc[_» more&period;&period;&period;_]#


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