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

Function mtime_since

examples/reg-wait.c:18–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16#include "helpers.h"
17
18static unsigned long long mtime_since(const struct timeval *s,
19 const struct timeval *e)
20{
21 long long sec, usec;
22
23 sec = e->tv_sec - s->tv_sec;
24 usec = (e->tv_usec - s->tv_usec);
25 if (sec > 0 && usec < 0) {
26 sec--;
27 usec += 1000000;
28 }
29
30 sec *= 1000;
31 usec /= 1000;
32 return sec + usec;
33}
34
35static unsigned long long mtime_since_now(struct timeval *tv)
36{

Callers 1

mtime_since_nowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected