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

Function create_client_omit_timer

src/iperf_client_api.c:272–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272static int
273create_client_omit_timer(struct iperf_test * test)
274{
275 struct iperf_time now;
276 TimerClientData cd;
277 if (NULL == test)
278 {
279 iperf_err(NULL, "No test\n");
280 return -1;
281 }
282
283 if (test->omit == 0) {
284 test->omit_timer = NULL;
285 test->omitting = 0;
286 } else {
287 if (iperf_time_now(&now) < 0) {
288 i_errno = IEINITTEST;
289 return -1;
290 }
291 test->omitting = 1;
292 cd.p = test;
293 test->omit_timer = tmr_create(&now, client_omit_timer_proc, cd, test->omit * SEC_TO_US, 0);
294 if (test->omit_timer == NULL) {
295 i_errno = IEINITTEST;
296 return -1;
297 }
298 }
299 return 0;
300}
301
302int
303iperf_handle_message_client(struct iperf_test *test)

Callers 1

Calls 3

iperf_errFunction · 0.85
iperf_time_nowFunction · 0.85
tmr_createFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…