Lines Matching refs:diff
125 iperf_time_diff(struct iperf_time *time1, struct iperf_time *time2, struct iperf_time *diff) in iperf_time_diff() argument
132 diff->secs = 0; in iperf_time_diff()
133 diff->usecs = 0; in iperf_time_diff()
137 diff->secs = time1->secs - time2->secs; in iperf_time_diff()
138 diff->usecs = time1->usecs; in iperf_time_diff()
139 if (diff->usecs < time2->usecs) { in iperf_time_diff()
140 diff->secs -= 1; in iperf_time_diff()
141 diff->usecs += 1000000; in iperf_time_diff()
143 diff->usecs = diff->usecs - time2->usecs; in iperf_time_diff()
145 diff->secs = time2->secs - time1->secs; in iperf_time_diff()
146 diff->usecs = time2->usecs; in iperf_time_diff()
147 if (diff->usecs < time1->usecs) { in iperf_time_diff()
148 diff->secs -= 1; in iperf_time_diff()
149 diff->usecs += 1000000; in iperf_time_diff()
151 diff->usecs = diff->usecs - time1->usecs; in iperf_time_diff()