X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=gettime.c;h=79455284a30d715b819a779bf3e7943c602eb549;hb=8847ae4cd2e3d0d73dd7d7c93c5d6da96b71d174;hp=3dcaaf680803fdcdb798de6009745f7821118d39;hpb=dae89ac91f813b90323328e2b6e8d6a2b8252c71;p=fio.git 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;