46 while (result->
tv_usec > 1000000) {
int gettimeofday(struct timeval *tv, struct timezone *tz)
int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y)
float duration_elapsed(const struct duration *duration)
int timeval_compare(const struct timeval *x, const struct timeval *y)
int timeval_add_time(struct timeval *result, long sec, long usec)
int duration_measure(struct duration *duration)
Update the duration->elapsed field to finish the duration measurement.
int duration_start(struct duration *duration)
Update the duration->start field to start the duration measurement.
float duration_kbps(const struct duration *duration, size_t count)