fix monotime test mocking on 32-bit systems

This commit is contained in:
Nick Mathewson 2016-07-21 14:05:29 +02:00
parent 61ce6dcb40
commit 852cff043b

View File

@ -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