summaryrefslogtreecommitdiff
path: root/src/lib/time/tvdiff.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-28 12:57:01 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-28 13:01:54 -0400
commita097ddb4f5105d33146eb8f6afa7d6cd01d47fea (patch)
tree95672fa21f374915677bd3b9fec3b3cb74d269b7 /src/lib/time/tvdiff.h
parentbdea94a6653240e0e477eda186ceccbe6be00535 (diff)
downloadtor-a097ddb4f5105d33146eb8f6afa7d6cd01d47fea.tar.gz
tor-a097ddb4f5105d33146eb8f6afa7d6cd01d47fea.zip
Extract time functionality into lib/wallclock and lib/time
Diffstat (limited to 'src/lib/time/tvdiff.h')
-rw-r--r--src/lib/time/tvdiff.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/time/tvdiff.h b/src/lib/time/tvdiff.h
new file mode 100644
index 0000000000..215de9cf37
--- /dev/null
+++ b/src/lib/time/tvdiff.h
@@ -0,0 +1,16 @@
+/* Copyright (c) 2003-2004, Roger Dingledine
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2018, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#ifndef TOR_TVDIFF_H
+#define TOR_TVDIFF_H
+
+#include "lib/cc/torint.h"
+struct timeval;
+
+long tv_udiff(const struct timeval *start, const struct timeval *end);
+long tv_mdiff(const struct timeval *start, const struct timeval *end);
+int64_t tv_to_msec(const struct timeval *tv);
+
+#endif