inline
struct timeval operator-(const struct timeval& a, const struct timeval& b)
{
- timeval result;
+ struct timeval result;
result.tv_sec = a.tv_sec - b.tv_sec;
result.tv_usec = a.tv_usec - b.tv_usec;
if (result.tv_usec < 0) {
return result;
}
-double timertod(const timeval& a)
+double timertod(const struct timeval& a)
{
return a.tv_sec + a.tv_usec / 1e6;
}