MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / remainingTime

Method remainingTime

Control/L3Utils.cpp:96–109  ·  view source on GitHub ↗

Return the remaining time of any timers, or nextTimeout if none active. The idiom is to pass it -1, and it returns it if no timers running. This was meant for the single-thread version of the State Machines and is not currently used.

Source from the content-addressed store, hash-verified

94 // The idiom is to pass it -1, and it returns it if no timers running.
95 // This was meant for the single-thread version of the State Machines and is not currently used.
96 int L3TimerList::remainingTime() {
97 int nextTimeout = -1;
98 for (L3TimerId tid = (L3TimerId)0; tid < cNumTimers; tid = (L3TimerId)(tid + 1)) {
99 if (mtlTimers[tid].tIsActive()) {
100 int remaining = mtlTimers[tid].tRemaining();
101 if (nextTimeout == -1) {
102 nextTimeout = remaining;
103 } else {
104 nextTimeout = min(nextTimeout,remaining);
105 }
106 }
107 }
108 return nextTimeout;
109 }
110};

Callers 1

csl3HandleTimersMethod · 0.80

Calls 2

tIsActiveMethod · 0.80
tRemainingMethod · 0.80

Tested by

no test coverage detected