diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-01-14 14:48:00 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-01-14 14:48:00 -0500 |
commit | b169c8c14f23394b40305f38ee4ce08add278e27 (patch) | |
tree | 0649da16a97792103773f9d5cedbfd75deac49bd /src/lib/time | |
parent | 691dec5d4615dec9a845d0f7dea7ef55cc66fe62 (diff) | |
parent | b269ab5aaeee65a3a0b1e5e0923d9dc7898c232e (diff) | |
download | tor-b169c8c14f23394b40305f38ee4ce08add278e27.tar.gz tor-b169c8c14f23394b40305f38ee4ce08add278e27.zip |
Merge remote-tracking branch 'asn-github/adaptive_padding-final'
Diffstat (limited to 'src/lib/time')
-rw-r--r-- | src/lib/time/.may_include | 1 | ||||
-rw-r--r-- | src/lib/time/compat_time.c | 4 | ||||
-rw-r--r-- | src/lib/time/compat_time.h | 2 | ||||
-rw-r--r-- | src/lib/time/tvdiff.c | 3 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/time/.may_include b/src/lib/time/.may_include index 40a18805ac..ae01431b60 100644 --- a/src/lib/time/.may_include +++ b/src/lib/time/.may_include @@ -7,6 +7,7 @@ lib/log/*.h lib/subsys/*.h lib/time/*.h lib/wallclock/*.h +lib/defs/time.h # For load_windows_system_lib. lib/fs/winlib.h
\ No newline at end of file diff --git a/src/lib/time/compat_time.c b/src/lib/time/compat_time.c index f1ddb4fdc4..387b0fad22 100644 --- a/src/lib/time/compat_time.c +++ b/src/lib/time/compat_time.c @@ -787,8 +787,8 @@ monotime_absolute_nsec(void) return monotime_diff_nsec(&initialized_at, &now); } -uint64_t -monotime_absolute_usec(void) +MOCK_IMPL(uint64_t, +monotime_absolute_usec,(void)) { return monotime_absolute_nsec() / 1000; } diff --git a/src/lib/time/compat_time.h b/src/lib/time/compat_time.h index c5337e9998..3c8797c450 100644 --- a/src/lib/time/compat_time.h +++ b/src/lib/time/compat_time.h @@ -199,7 +199,7 @@ uint64_t monotime_absolute_nsec(void); /** * Return the number of microseconds since the timer system was initialized. */ -uint64_t monotime_absolute_usec(void); +MOCK_DECL(uint64_t, monotime_absolute_usec,(void)); /** * Return the number of milliseconds since the timer system was initialized. */ diff --git a/src/lib/time/tvdiff.c b/src/lib/time/tvdiff.c index bc8a1166e7..9dfb63c26f 100644 --- a/src/lib/time/tvdiff.c +++ b/src/lib/time/tvdiff.c @@ -11,6 +11,7 @@ #include "lib/time/tvdiff.h" #include "lib/cc/compat_compiler.h" +#include "lib/defs/time.h" #include "lib/log/log.h" #ifdef _WIN32 @@ -20,8 +21,6 @@ #include <sys/time.h> #endif -#define TOR_USEC_PER_SEC 1000000 - /** Return the difference between start->tv_sec and end->tv_sec. * Returns INT64_MAX on overflow and underflow. */ |