chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
saner play rate logic for speaker process
[disorder]
/
lib
/
timeval.h
diff --git
a/lib/timeval.h
b/lib/timeval.h
index cefc9905fe090adf5844c51780c8b6c71dd0df30..ff8ccf08191678b91257db58e236b605f96602d5 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 uint64_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 */
/*