您的位置:首页 > 教育 > 锐评 > 建筑公司取名参考_站长工具seo综合查询全面解析_哈尔滨网站优化流程_顺德搜索seo网络推广

建筑公司取名参考_站长工具seo综合查询全面解析_哈尔滨网站优化流程_顺德搜索seo网络推广

2025/4/3 5:08:20 来源:https://blog.csdn.net/weixin_52355727/article/details/146884669  浏览:    关键词:建筑公司取名参考_站长工具seo综合查询全面解析_哈尔滨网站优化流程_顺德搜索seo网络推广
建筑公司取名参考_站长工具seo综合查询全面解析_哈尔滨网站优化流程_顺德搜索seo网络推广

文章目录

  • 设计
  • 知识点

设计

belongs to
1
1
manages
many
«enable_shared_from_this»
Timer
-uint64_t m_ms
-uint64_t m_next
-bool m_recurring
-TimerManager* m_manager
+struct Comparator
-std::function m_cb
+bool cancel()
+bool refresh()
+bool reset(uint64_t ms, bool from_now)
-Timer(uint64_t ms, std::function cb, bool recurring, TimerManager* manager)
-Timer(uint64_t next)
TimerManager
-RWMutexType m_mutex
-std::set m_timers
-bool m_tickled
-uint64_t m_previouseTime
+TimerManager()
+~TimerManager()
+Timer::ptr addTimer(uint64_t ms, std::function cb, bool recurring = false)
+Timer::ptr addConditionTimer(uint64_t ms, std::function cb, std::weak_ptr weak_cond, bool recurring = false)
+uint64_t getNextTimer()
+void listExpiredCb(std::vector>& cbs)
+bool hasTimer()
+bool detectClockRollover(uint64_t now_ms)
#virtual void onTimerInsertedAtFront()
#void addTimer(Timer::ptr val, RWMutexType::WriteLock& lock)
enable_shared_from_this
Main iom timer_callback g_logger s_timer test_timer() addTimer(1000, timer_callback, true) Create and start recurring timer (1000ms) addTimer(500, lambda) Log "500ms timeout" after 500ms addTimer(5000, lambda) Log "5000ms timeout" after 5000ms timer_callback() Log "timer callback, timeout = {timeout}" Reset timer with new timeout (+1000ms) Cancel timer Stop recurring execution alt [timeout >= 5000] loop [Recurring Timer Execution] Main iom timer_callback g_logger s_timer

知识点

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com