chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
suppress more redundant redisplay_tree() calls
[disorder]
/
lib
/
timeval.h
diff --git
a/lib/timeval.h
b/lib/timeval.h
index cefc9905fe090adf5844c51780c8b6c71dd0df30..9ec8c31038307b3245aed9c411fa46743fc57f46 100644
(file)
--- a/
lib/timeval.h
+++ b/
lib/timeval.h
@@
-38,6
+38,12
@@
static inline struct timeval tvsub(const struct timeval a,
return r;
}
+static inline int64_t tvsub_us(const struct timeval a,
+ const struct timeval b) {
+ return (((uint64_t)a.tv_sec * 1000000 + a.tv_usec)
+ - ((uint64_t)b.tv_sec * 1000000 + b.tv_usec));
+}
+
#endif /* TIMEVAL_H */
/*