imep_timers.cc
来自「ns2.1b5版本中cbrp碼」· CC 代码 · 共 45 行
CC
45 行
/* 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 + =
减小字号Ctrl + -
显示快捷键?