mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Initialize monotonic timer code before using it in the tests
This commit is contained in:
parent
251b348d7b
commit
cfc62e2374
@ -5330,6 +5330,8 @@ test_util_monotonic_time(void *arg)
|
|||||||
uint64_t nsec1, nsec2, usec1, msec1;
|
uint64_t nsec1, nsec2, usec1, msec1;
|
||||||
uint64_t nsecc1, nsecc2, usecc1, msecc1;
|
uint64_t nsecc1, nsecc2, usecc1, msecc1;
|
||||||
|
|
||||||
|
monotime_init();
|
||||||
|
|
||||||
monotime_get(&mt1);
|
monotime_get(&mt1);
|
||||||
monotime_coarse_get(&mtc1);
|
monotime_coarse_get(&mtc1);
|
||||||
nsec1 = monotime_absolute_nsec();
|
nsec1 = monotime_absolute_nsec();
|
||||||
@ -5374,6 +5376,7 @@ static void
|
|||||||
test_util_monotonic_time_ratchet(void *arg)
|
test_util_monotonic_time_ratchet(void *arg)
|
||||||
{
|
{
|
||||||
(void)arg;
|
(void)arg;
|
||||||
|
monotime_init();
|
||||||
monotime_reset_ratchets_for_testing();
|
monotime_reset_ratchets_for_testing();
|
||||||
|
|
||||||
/* win32, performance counter ratchet. */
|
/* win32, performance counter ratchet. */
|
||||||
|
Loading…
Reference in New Issue
Block a user