diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-08-31 14:34:49 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-08-31 14:34:49 -0400 |
commit | cfc62e2374ec34eb2892b032dd33f852daaada6d (patch) | |
tree | a95e7114e899edf5988df6de230eb5506f0b7229 | |
parent | 251b348d7b4c4f36bd0a3e14d10ace31c0e9bc25 (diff) | |
download | tor-cfc62e2374ec34eb2892b032dd33f852daaada6d.tar.gz tor-cfc62e2374ec34eb2892b032dd33f852daaada6d.zip |
Initialize monotonic timer code before using it in the tests
-rw-r--r-- | src/test/test_util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 2ff9d77104..445abb9237 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -5330,6 +5330,8 @@ test_util_monotonic_time(void *arg) uint64_t nsec1, nsec2, usec1, msec1; uint64_t nsecc1, nsecc2, usecc1, msecc1; + monotime_init(); + monotime_get(&mt1); monotime_coarse_get(&mtc1); nsec1 = monotime_absolute_nsec(); @@ -5374,6 +5376,7 @@ static void test_util_monotonic_time_ratchet(void *arg) { (void)arg; + monotime_init(); monotime_reset_ratchets_for_testing(); /* win32, performance counter ratchet. */ |