folly::TimeoutManager::tryRunAfterDelay

Attempts to run the given Cob after the specified delay.

Synopsis

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

bool
tryRunAfterDelay(
    Func cob,
    uint32_t milliseconds,
    InternalEnum internal = InternalEnum::NORMAL);

Return Value

true iff the cob was successfully registered.

Parameters

NameDescription
cobThe callback to run after the delay.
millisecondsThe delay before the callback runs, in milliseconds.
internalWhether the timeout is treated as an internal event.

See Also

runAfterDelay for more details