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

Function tmr_timeout

src/timer.c:153–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151
152
153struct timeval*
154tmr_timeout( struct iperf_time* nowP )
155{
156 struct iperf_time now, diff;
157 int64_t usecs;
158 int past;
159 static struct timeval timeout;
160
161 getnow( nowP, &now );
162 /* Since the list is sorted, we only need to look at the first timer. */
163 if ( timers == NULL )
164 return NULL;
165 past = iperf_time_diff(&timers->time, &now, &diff);
166 if (past)
167 usecs = 0;
168 else
169 usecs = iperf_time_in_usecs(&diff);
170 timeout.tv_sec = usecs / 1000000LL;
171 timeout.tv_usec = usecs % 1000000LL;
172 return &timeout;
173}
174
175
176void

Callers 2

iperf_run_clientFunction · 0.85
iperf_run_serverFunction · 0.85

Calls 3

getnowFunction · 0.85
iperf_time_diffFunction · 0.85
iperf_time_in_usecsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…