📄 imep_timers.cc
字号:
/* imep_timers.cc $Id: imep_timers.cc,v 1.4 1998/11/19 06:17:14 dmaltz 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 + -