[ns] EDCF CODE QUESTION
=?big5?q?=20=20=20?=
hardball427 at yahoo.com.tw
Mon Feb 9 04:35:19 PST 2004
void
DeferTimer_802_11e::pause()
{
Scheduler &s = Scheduler::instance();
for(int pri = 0; pri < MAX_PRI; pri++ ){
if(defer_[pri] && busy_){
double st = s.clock(); //now
double rt = stime_[pri]; // Start-Time of defer
~~~~~~~~~~~~~~~~~~~~~~
What is the meaning and perpose of stime_[PRI] ? I am confused with this and totally loss. Hope you can give me your hand!
double sr = st - rt;
assert(busy_ && ! paused_);
if(rtime_[pri] - sr >= 0.0) {
rtime_[pri] -= sr;
assert(rtime_[pri] >= 0.0);
} else{
if(rtime_[pri] + round - sr >= 0.0){
rtime_[pri] = 0;
} else {
cout<<"ERROR in DeferTimer::pause(), rtime_["<<pri<<"] is "<<rtime_[pri]<<", sr:"<<sr<<" \n";
exit(0);
}
}
}
}
s.cancel(&intr);
paused_ = 1;
}
---------------------------------
¨C¤Ñ³£ Yahoo!©_¼¯
®üªºÃC¦â¡B·ªº®ð®§¡B·R§Aªº·Å«×¡AºÉ¦b«H¯È©³¹Ï
«H¯È©³¹Ï
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gamma.isi.edu/pipermail/ns-users/attachments/20040209/36291c14/attachment.html
More information about the Ns-users
mailing list