X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/147d0e88c4da14c801d15e0875bedb474180bea2..6f5ec5fdc42f96a8fe95f4b846b163d4dc92e0c8:/timer.h?ds=sidebyside diff --git a/timer.h b/timer.h index 0e8c7d9..dbf32e1 100644 --- a/timer.h +++ b/timer.h @@ -28,7 +28,7 @@ struct timeval operator+(const struct timeval& a, const struct timeval& b) 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) { @@ -38,7 +38,7 @@ struct timeval operator-(const struct timeval& a, const struct timeval& b) return result; } -double timertod(const timeval& a) +double timertod(const struct timeval& a) { return a.tv_sec + a.tv_usec / 1e6; }