MCPcopy Create free account
hub / github.com/esnet/iperf / tmr_run

Function tmr_run

src/timer.c:176–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176void
177tmr_run( struct iperf_time* nowP )
178{
179 struct iperf_time now;
180 Timer* t;
181 Timer* next;
182
183 getnow( nowP, &now );
184 for ( t = timers; t != NULL; t = next ) {
185 next = t->next;
186 /* Since the list is sorted, as soon as we find a timer
187 ** that isn't ready yet, we are done.
188 */
189 if (iperf_time_compare(&t->time, &now) > 0)
190 break;
191 (t->timer_proc)( t->client_data, &now );
192 if ( t->periodic ) {
193 /* Reschedule. */
194 iperf_time_add_usecs(&t->time, t->usecs);
195 list_resort( t );
196 } else
197 tmr_cancel( t );
198 }
199}
200
201
202void

Callers 3

iperf_run_clientFunction · 0.85
mainFunction · 0.85
iperf_run_serverFunction · 0.85

Calls 5

getnowFunction · 0.85
iperf_time_compareFunction · 0.85
iperf_time_add_usecsFunction · 0.85
list_resortFunction · 0.85
tmr_cancelFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…