Set the maximum desired latency in us and provide a callback which will be called when that latency is exceeded. OBS: This functionality depends on time‐measurement.

Synopsis

Declared in <folly/io/async/EventBase.h>

void
setMaxLatency(
    std::chrono::microseconds maxLatency,
    Func maxLatencyCob,
    bool dampen = true);

Parameters

Name

Description

maxLatency

The maximum desired loop latency.

maxLatencyCob

The callback invoked when latency is exceeded.

dampen

Whether to dampen the smoothed latency after a callback.

Created with MrDocs