| 174 | |
| 175 | |
| 176 | void |
| 177 | tmr_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 | |
| 202 | void |
no test coverage detected
searching dependent graphs…