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

Function getnow

src/timer.c:50–57  ·  view source on GitHub ↗

This is an efficiency tweak. All the routines that need to know the ** current time get passed a pointer to a struct iperf_time. If it's non-NULL ** it gets used, otherwise we do our own iperf_time_now() to fill it in. ** This lets the caller avoid extraneous iperf_time_now()s when efficiency ** is needed, and not bother with the extra code when efficiency doesn't ** matter too much. */

Source from the content-addressed store, hash-verified

48** matter too much.
49*/
50static void
51getnow( struct iperf_time* nowP, struct iperf_time* nowP2 )
52{
53 if ( nowP != NULL )
54 *nowP2 = *nowP;
55 else
56 iperf_time_now(nowP2);
57}
58
59
60static void

Callers 4

tmr_createFunction · 0.85
tmr_timeoutFunction · 0.85
tmr_runFunction · 0.85
tmr_resetFunction · 0.85

Calls 1

iperf_time_nowFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…