19 return t.tv_sec + t.tv_usec / 1000000.;
28 gettimeofday(&now, NULL);
35 struct timeval
VuoTimeUtilities::getElapsedTime(const struct timeval &start, const struct timeval &end)
37 long int diff = (end.tv_usec + 1000000 * end.tv_sec) - (start.tv_usec + 1000000 * start.tv_sec);
38 struct timeval result;
39 result.tv_sec = diff / 1000000;
40 result.tv_usec = diff % 1000000;
49 printf(
"%ld.%06d\n", time.tv_sec, time.tv_usec);