⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imep_timers.cc

📁 在Linux下做的QuadTree的程序
💻 CC
字号:
/*    imep_timers.cc   $Id: imep_timers.cc,v 1.1.1.1 2000/08/28 18:40:13 jinyang Exp $   */#include <cmu/imep/imep.h>#include <packet.h>#include <ip.h>#define CURRENT_TIME	Scheduler::instance().clock()// ======================================================================// ======================================================================voidimepTimer::handle(Event *){	busy_ = 0;	agent->handlerTimer(type_);}voidimepTimer::start(double time){	assert(busy_ == 0);	busy_ = 1;	Scheduler::instance().schedule(this, &intr, time);}voidimepTimer::cancel(){	assert(busy_ == 1);	busy_ = 0;	Scheduler::instance().cancel(&intr);}doubleimepTimer::timeLeft(){        assert(busy_ == 1);	return intr.time_ - CURRENT_TIME;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -