12#ifndef LLVM_EXPONENTIALBACKOFF_H
13#define LLVM_EXPONENTIALBACKOFF_H
36 using duration = std::chrono::steady_clock::duration;
37 using time_point = std::chrono::steady_clock::time_point;
46 duration MinWait = std::chrono::milliseconds(10),
47 duration MaxWait = std::chrono::milliseconds(500))
48 : MinWait(MinWait), MaxWait(MaxWait),
60 std::random_device RandDev;
61 int64_t CurrentMultiplier = 1;
static sys::TimePoint< std::chrono::seconds > now(bool Deterministic)
A class to help implement exponential backoff.
LLVM_ABI bool waitForNextAttempt()
Blocks while waiting for the next attempt.
std::chrono::steady_clock::duration duration
ExponentialBackoff(duration Timeout, duration MinWait=std::chrono::milliseconds(10), duration MaxWait=std::chrono::milliseconds(500))
std::chrono::steady_clock::time_point time_point
This is an optimization pass for GlobalISel generic memory operations.
@ Timeout
Reached timeout while waiting for the owner to release the lock.
Implement std::hash so that hash_code can be used in STL containers.