60class
Timer final : public std::enable_shared_from_this<
Timer> {
62 using Ptr = std::shared_ptr<Timer>;
75 TimerTask::
Ptr delay(const std::function<
void()> &
callback, int64_t relative_timestamp,
bool is_repeat = false) noexcept;
77 void shutdown() noexcept;
88 std::atomic_bool isShutdown =
false;
89 std::atomic<int64_t> currentTimestamp = 0;
90 std::list<TimerTask::Ptr> *timerTasks =
nullptr;