23 QElapsedTimer LastInvocation_;
24 std::chrono::milliseconds Interval_;
26 QVector<std::coroutine_handle<>> Queue_;
28 int BackoffFactor_ = 0;
33 std::coroutine_handle<> Handle_ {};
35 explicit Awaiter (
Throttle& throttle);
36 Awaiter (Awaiter&& other)
noexcept;
38 Awaiter (
const Awaiter&) =
delete;
39 Awaiter& operator= (
const Awaiter&) =
delete;
40 Awaiter& operator= (Awaiter&&) =
delete;
44 bool await_ready ()
const;
45 void await_suspend (std::coroutine_handle<>);
49 explicit Throttle (std::chrono::milliseconds, Qt::TimerType = Qt::TimerType::CoarseTimer);
55 Awaiter
operator co_await ();
57 void StartTimer (std::chrono::milliseconds);