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

Function mtime_since

examples/proxy.h:77–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77static unsigned long long mtime_since(const struct timeval *s,
78 const struct timeval *e)
79{
80 long long sec, usec;
81
82 sec = e->tv_sec - s->tv_sec;
83 usec = (e->tv_usec - s->tv_usec);
84 if (sec > 0 && usec < 0) {
85 sec--;
86 usec += 1000000;
87 }
88
89 sec *= 1000;
90 usec /= 1000;
91 return sec + usec;
92}
93
94static unsigned long long mtime_since_now(struct timeval *tv)
95{

Callers 1

mtime_since_nowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected