[#BCLog-LogRateLimiter-Create] = xref:BCLog.adoc[BCLog]::xref:BCLog/LogRateLimiter.adoc[LogRateLimiter]::Create :relfileprefix: ../../ :mrdocs: Create a shared rate limiter and schedule its periodic window reset. == Synopsis Declared in `<logging.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static std::shared_ptr<LogRateLimiter> Create( xref:BCLog/LogRateLimiter/SchedulerFunction.adoc[SchedulerFunction]&& scheduler_func, uint64_t max_bytes, std::chrono::seconds reset_window); ---- == Return Value A shared pointer to the newly created rate limiter. == Parameters [cols="1,4"] |=== | Name| Description | *scheduler_func* | Callable object used to schedule resetting the window. The first parameter is the function to be executed, and the second is the reset_window interval. | *max_bytes* | Maximum number of bytes that can be logged for each source location. | *reset_window* | Time window after which the stats are reset. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#