MCPcopy Create free account
hub / github.com/axboe/liburing / mtime_since

Function mtime_since

test/helpers.c:321–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321unsigned long long mtime_since(const struct timeval *s, const struct timeval *e)
322{
323 long long sec, usec;
324
325 sec = e->tv_sec - s->tv_sec;
326 usec = (e->tv_usec - s->tv_usec);
327 if (sec > 0 && usec < 0) {
328 sec--;
329 usec += 1000000;
330 }
331
332 sec *= 1000;
333 usec /= 1000;
334 return sec + usec;
335}
336
337unsigned long long mtime_since_now(struct timeval *tv)
338{

Callers 1

mtime_since_nowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected