#include <xtend/time.h>
-lextend
time_t difftimeofday(struct timeval *later, struct timeval *earlier)
later, earlier: timeval structures populated by gettimeofday(3)
difftimeofday() returns the difference, in microseconds, between two time values
returned by gettimeofday(3). This function can be used to get a good estimate
of the real time elapsed in a process between any two points (where calls to
gettimeofday(3) are strategically placed.)
Use of these functions should have minimal impact on run time,
unless called many times to measure time of a function with a very short run
time.
The difference between the two times in microseconds
gettimeofday(2), xt_tic(3), xt_toc(3)