summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/compat_time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index 011bc9e2a4..cc2c3c8a74 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -347,8 +347,8 @@ monotime_coarse_get(monotime_coarse_t *out)
{
#ifdef TOR_UNIT_TESTS
if (monotime_mocking_enabled) {
- out->ts_.tv_sec = mock_time_nsec_coarse / ONE_BILLION;
- out->ts_.tv_nsec = mock_time_nsec_coarse % ONE_BILLION;
+ out->ts_.tv_sec = (time_t) (mock_time_nsec_coarse / ONE_BILLION);
+ out->ts_.tv_nsec = (int) (mock_time_nsec_coarse % ONE_BILLION);
return;
}
#endif