X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=gettime.c;h=79455284a30d715b819a779bf3e7943c602eb549;hp=3dcaaf680803fdcdb798de6009745f7821118d39;hb=0410e7834e18760c4b38d8e51483c649d47aa0c0;hpb=084a5475d55b6cad7550e56a46d8797e8534bb2d diff --git a/gettime.c b/gettime.c index 3dcaaf68..79455284 100644 --- a/gettime.c +++ b/gettime.c @@ -448,6 +448,14 @@ uint64_t ntime_since(const struct timespec *s, const struct timespec *e) return nsec + (sec * 1000000000LL); } +uint64_t ntime_since_now(const struct timespec *s) +{ + struct timespec now; + + fio_gettime(&now, NULL); + return ntime_since(s, &now); +} + uint64_t utime_since(const struct timespec *s, const struct timespec *e) { int64_t sec, usec;