add Timer::GetDelayLeft
This commit is contained in:
1 parent
5d04ece965
commit
b8ddfa1f53
2 files changed
+25
-1
No files matched your search
+19
-1
@@ -57,7 +57,25 @@ Timer::GetDelay (void) const
|
||||
{
|
||||
return m_delay;
|
||||
}
|
||||
|
||||
Time
|
||||
Timer::GetDelayLeft (void) const
|
||||
{
|
||||
switch (GetState ()) {
|
||||
case Timer::RUNNING:
|
||||
return Simulator::GetDelayLeft (m_event);
|
||||
break;
|
||||
case Timer::EXPIRED:
|
||||
return TimeStep (0);
|
||||
break;
|
||||
case Timer::SUSPENDED:
|
||||
return m_delayLeft;
|
||||
break;
|
||||
default:
|
||||
NS_ASSERT (false);
|
||||
return TimeStep (0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Timer::Cancel (void)
|
||||
|
||||
Reference in new issue
Block a user