mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 04:48:27 +00:00
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:
parent
f954cb4ced
commit
adb1b24c28
3 changed files with 6 additions and 6 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue