28 #ifndef YSL_INC_Service_ytimer_h_
29 #define YSL_INC_Service_ytimer_h_ 1
32 #include YFM_YSLib_Core_YShellDefinition
49 using rep = duration::rep;
51 using time_point = std::chrono::time_point<HighResolutionClock, duration>;
168 inline PDefH(
bool, CheckTimeout, Timer& tmr) ynothrow
176 inline PDefH(
bool, Test, const Timer& tmr) ynothrow
TimePoint nBase
时间基点:计时的起点。
void Refresh(PaintEventArgs &&) override
刷新:按指定参数绘制界面并更新状态。
#define DefDeDtor(_t)
定义默认析构函数。
std::chrono::nanoseconds duration
#define DefGetter(_q, _t, _n,...)
Duration Interval
重复刷新有效的最小时间间隔。
std::chrono::time_point< HighResolutionClock, duration > time_point
不可复制对象:禁止派生类调用默认原型的复制构造函数和复制赋值操作符。
YF_API void Delay(const TimeSpan &)
阻塞延时。
#define ynothrow
YSLib 无异常抛出保证:若支持 noexcept 关键字, 指定特定的 noexcept 异常规范。
YF_API std::uint64_t GetHighResolutionTicks()
取高精度 tick 数。
#define yconstexpr
指定编译时常量表达式。
HighResolutionClock::time_point TimePoint
时刻。
HighResolutionClock::duration Duration
高精度时间间隔。
std::chrono::milliseconds TimeSpan
低精度时间间隔。
void Activate(Timer &tmr)