Use setTimeout() trick instead of Window.requestIdleCallback() (#3044)

This commit is contained in:
daxpedda 2023-08-25 21:40:21 +02:00 committed by GitHub
parent 68ef9f707e
commit 48abf52aac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 198 additions and 133 deletions

View file

@ -7,7 +7,7 @@ use web_time::Instant;
pub enum State {
Init,
WaitUntil {
timeout: backend::Timeout,
timeout: backend::Schedule,
start: Instant,
end: Instant,
},
@ -15,7 +15,7 @@ pub enum State {
start: Instant,
},
Poll {
request: backend::IdleCallback,
request: backend::Schedule,
},
Exit,
}