Fix the slint_mock_elapsed_time when not using the testing backend

The nodejs tests don't use the testing backend, as a result, calling
`platform::update_timers_and_animations` would use the real time instead
of the fake time.
So call `maybe_activate_timers` with the fake time instead
This commit is contained in:
Olivier Goffart 2022-09-16 11:30:48 +02:00 committed by Olivier Goffart
parent f954cb4ced
commit adb1b24c28
3 changed files with 6 additions and 6 deletions

View file

@ -166,7 +166,7 @@ pub fn set_platform(platform: Box<dyn Platform + 'static>) -> Result<(), SetPlat
/// This function should be called before rendering or processing input event, at the
/// beginning of each event loop iteration.
pub fn update_timers_and_animations() {
crate::timers::TimerList::maybe_activate_timers();
crate::timers::TimerList::maybe_activate_timers(crate::animations::Instant::now());
crate::animations::update_animations();
}