tinyrpc/includes/net/timer.hpp

23 lines
454 B
C++
Raw Permalink Normal View History

2024-12-25 19:38:36 +08:00
#pragma once
#include "fd_event.hpp"
#include "reactor.hpp"
#include <chrono>
2024-12-25 19:38:36 +08:00
namespace tinyrpc {
class Timer : FdEvent {
public:
Timer(Reactor::Task cb = FdEvent::m_default_callback);
// TODO 完善
// template<typename Rep, typename Period = std::ratio<1>>
// void setInterval(std::chrono::duration<Rep, Period> duar);
2024-12-25 19:38:36 +08:00
~Timer();
private:
// TODO .... 完善 Timer 类
};
}