diff --git a/pybricks/tools/pb_module_tools.c b/pybricks/tools/pb_module_tools.c index 15ea1645a..866232260 100644 --- a/pybricks/tools/pb_module_tools.c +++ b/pybricks/tools/pb_module_tools.c @@ -74,7 +74,7 @@ static mp_obj_t pb_module_tools_wait(size_t n_args, const mp_obj_t *pos_args, mp return pb_type_awaitable_await_or_wait( NULL, // wait functions are not associated with an object MP_STATE_PORT(wait_awaitables), - mp_hal_ticks_ms() + (time < 0 ? 0 : time), + mp_hal_ticks_ms() + time, pb_module_tools_wait_test_completion, pb_type_awaitable_return_none, pb_type_awaitable_cancel_none,