YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YSLib::Timers::Timer类 参考

计时器。 更多...

#include <ytimer.h>

类 YSLib::Timers::Timer 继承关系图:
YSLib::Timers::Timer 的协作图:

Public 成员函数

 Timer (const Duration &={}, bool=true)
 构造:使用时间间隔和激活状态。 更多...
 
virtual DefDeDtor (Timer) DefGetter(const ynothrow
 
 PDefH (void, Delay, const Duration &d) ImplExpr(nBase+
 延时。 更多...
 
Duration RefreshDelta ()
 刷新:对于非零时间间隔判断有效性并都更新时间基点。 更多...
 
Duration RefreshRemainder ()
 刷新:对于非零时间间隔判断有效性并都更新时间基点。 更多...
 

Public 属性

Duration Interval
 重复刷新有效的最小时间间隔。 更多...
 
virtual TimePoint
 
virtual BaseTick
 

Protected 属性

TimePoint nBase
 时间基点:计时的起点。 更多...
 

友元

virtual nBase YF_API friend void Activate (Timer &)
 激活:当时间间隔非零时同步时间基点。 更多...
 

额外继承的成员函数

- Private 成员函数 继承自 ystdex::noncopyable
 noncopyable (const noncopyable &)=delete
 禁止复制构造。 更多...
 
noncopyableoperator= (const noncopyable &)=delete
 禁止赋值复制。 更多...
 
 noncopyable ()=default
 protected 构造:默认实现。 更多...
 
 ~noncopyable ()=default
 protected 析构:默认实现。 更多...
 

详细描述

计时器。

自从
build 243

在文件 ytimer.h100 行定义.

构造及析构函数说明

YSLib::Timers::Timer::Timer ( const Duration i = {},
bool  b = true 
)
explicit

构造:使用时间间隔和激活状态。

自从
build 405

在文件 ytimer.cpp72 行定义.

参考 Activate.

成员函数说明

virtual YSLib::Timers::Timer::DefDeDtor ( Timer  ) const
virtual
自从
build 416
YSLib::Timers::Timer::PDefH ( void  ,
Delay  ,
const Duration d 
)

延时。

注解
非阻塞,立即返回。
自从
build 303
Duration YSLib::Timers::Timer::RefreshDelta ( )

刷新:对于非零时间间隔判断有效性并都更新时间基点。

前置条件
Interval != Duration::zero()
返回
当前时刻达到基点前的时间间隔。
自从
build 482

在文件 ytimer.cpp94 行定义.

参考 Interval, nBase, YSLib::Timers::HighResolutionClock::now(), YAssert , 以及 YB_UNLIKELY.

函数调用图:

Duration YSLib::Timers::Timer::RefreshRemainder ( )

刷新:对于非零时间间隔判断有效性并都更新时间基点。

前置条件
Interval != Duration::zero()
返回
当前时刻达到基点前的时间间隔于最小时间间隔的余数。
自从
build 482

在文件 ytimer.cpp106 行定义.

参考 Interval, nBase, YSLib::Timers::HighResolutionClock::now(), YAssert , 以及 YB_UNLIKELY.

参考自 YSLib::UI::Caret::Check().

函数调用图:

这是这个函数的调用关系图:

友元及相关函数文档

virtual nBase YF_API friend void Activate ( Timer tmr)
friend

激活:当时间间隔非零时同步时间基点。

在文件 ytimer.cpp118 行定义.

参考自 YSLib::UI::InputTimer::RefreshClick(), YSLib::UI::InputTimer::RefreshHeld() , 以及 Timer().

类成员变量说明

virtual YSLib::Timers::Timer::BaseTick

在文件 ytimer.h122 行定义.

Duration YSLib::Timers::Timer::Interval
TimePoint YSLib::Timers::Timer::nBase
protected

时间基点:计时的起点。

在文件 ytimer.h104 行定义.

参考自 YSLib::Timers::Activate(), RefreshDelta() , 以及 RefreshRemainder().

virtual YSLib::Timers::Timer::TimePoint

在文件 ytimer.h122 行定义.


该类的文档由以下文件生成: