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

Set the sustained rate of this rate limiter to the specified `sustainedRateLimit`, the sustained&hyphen;rate time&hyphen;window to the specified `sustainedRateWindow`, the peak rate to the specified `peakRateLimit` and the peak&hyphen;rate time&hyphen;window to the specified `peakRateWindow`&period; The behavior is undefined unless `0 &lt; sustainedRateLimit`, `0 &lt; sustainedRateWindow`, `0 &lt; peakRateLimit`, `0 &lt; peakRateWindow`, the product of `sustainedRateLimit` and `sustainedRateWindow` can be represented by 64&hyphen;bit unsigned integral type, and the product of `peakRateLimit` and `peakRateWindow` can be represented by 64&hyphen;bit unsigned integral type&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setRateLimits(
    xref:BloombergLP/bsls/Types/Uint64.adoc[bsls::Types::Uint64] sustainedRateLimit,
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& sustainedRateWindow,
    xref:BloombergLP/bsls/Types/Uint64.adoc[bsls::Types::Uint64] peakRateLimit,
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& peakRateWindow);
----


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