CBlueUI  
C++ 跨平台跨框架的数据可视化工具
载入中...
搜索中...
未找到
CTimerWheel类 参考

定时器,以时间轮方式实现 更多...

Public 成员函数

 CTimerWheel ()
 
 ~CTimerWheel ()
 
void InitWheel (uint16_t interval, uint64_t currtime)
 
timer_handler * AddTimer (timer_cb_t cb, uint32_t loop, uint32_t delay, uint32_t times=0)
 
void KillTimer (timer_handler *timer)
 
void Stop ()
 
void Run ()
 
void OnTimerHandler ()
 

Protected 属性

BOOL is_start
 
timerwheelm_tw_
 
std::thread m_th_
 

详细描述

定时器,以时间轮方式实现

构造及析构函数说明

◆ CTimerWheel()

CTimerWheel::CTimerWheel ( )

◆ ~CTimerWheel()

CTimerWheel::~CTimerWheel ( )

成员函数说明

◆ AddTimer()

timer_handler * CTimerWheel::AddTimer ( timer_cb_t  cb,
uint32_t  loop,
uint32_t  delay,
uint32_t  times = 0 
)

◆ InitWheel()

void CTimerWheel::InitWheel ( uint16_t  interval,
uint64_t  currtime 
)

◆ KillTimer()

void CTimerWheel::KillTimer ( timer_handler *  timer)

◆ OnTimerHandler()

void CTimerWheel::OnTimerHandler ( )

◆ Run()

void CTimerWheel::Run ( )

◆ Stop()

void CTimerWheel::Stop ( )

类成员变量说明

◆ is_start

BOOL CTimerWheel::is_start
protected

◆ m_th_

std::thread CTimerWheel::m_th_
protected

◆ m_tw_

timerwheel* CTimerWheel::m_tw_
protected
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2025 · CBlueStudio 版权所有