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 52abfeba21..58916825cb 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -331,8 +331,8 @@ monotime_get(monotime_t *out)
{
#ifdef TOR_UNIT_TESTS
if (monotime_mocking_enabled) {
- out->ts_.tv_sec = mock_time_nsec / ONE_BILLION;
- out->ts_.tv_nsec = mock_time_nsec % ONE_BILLION;
+ out->ts_.tv_sec = (time_t) (mock_time_nsec / ONE_BILLION);
+ out->ts_.tv_nsec = (int) (mock_time_nsec % ONE_BILLION);
return;
}
#endif