异步定时器
更多...
#include <rmvl/io/async.hpp>
|
| | Timer (IOContext &io_context) |
| | ~Timer () |
| template<typename Rep, typename Period> |
| TimerAwaiter | sleep_for (const std::chrono::duration< Rep, Period > &duration) |
| | 创建一个持续指定时间的定时等待器
|
| template<typename Clock, typename Duration> |
| TimerAwaiter | sleep_until (const std::chrono::time_point< Clock, Duration > &time_point) |
| | 创建一个在指定时间点触发的定时等待器
|
◆ Timer()
| rm::async::Timer::Timer |
( |
IOContext & | io_context | ) |
|
◆ ~Timer()
| rm::async::Timer::~Timer |
( |
| ) |
|
◆ sleep_for()
template<typename Rep, typename Period>
| TimerAwaiter rm::async::Timer::sleep_for |
( |
const std::chrono::duration< Rep, Period > & | duration | ) |
|
|
inline |
创建一个持续指定时间的定时等待器
- 参数
-
- 返回
- 定时等待器
◆ sleep_until()
template<typename Clock, typename Duration>
| TimerAwaiter rm::async::Timer::sleep_until |
( |
const std::chrono::time_point< Clock, Duration > & | time_point | ) |
|
|
inline |
创建一个在指定时间点触发的定时等待器
- 参数
-
- 返回
- 定时等待器
该类的文档由以下文件生成: