mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: Stop using time
in DOM timers (#33262)
This switches to using `std::time` types for DOM timer operations, which allows removing our custom time units in favor of `Duration`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
8a0c7487e7
commit
a4ceb82ef5
13 changed files with 78 additions and 106 deletions
|
@ -7,6 +7,7 @@
|
|||
use std::borrow::ToOwned;
|
||||
use std::ptr::{self, NonNull};
|
||||
use std::rc::Rc;
|
||||
use std::time::Duration;
|
||||
|
||||
use dom_struct::dom_struct;
|
||||
use js::jsapi::{Heap, JSObject, JS_NewPlainObject};
|
||||
|
@ -14,7 +15,6 @@ use js::jsval::{JSVal, NullValue};
|
|||
use js::rust::{CustomAutoRooterGuard, HandleObject, HandleValue};
|
||||
use js::typedarray::{self, Uint8ClampedArray};
|
||||
use script_traits::serializable::BlobImpl;
|
||||
use script_traits::MsDuration;
|
||||
use servo_config::prefs;
|
||||
|
||||
use crate::dom::bindings::buffer_source::create_buffer_source;
|
||||
|
@ -999,7 +999,7 @@ impl TestBindingMethods for TestBinding {
|
|||
};
|
||||
let _ = self.global().schedule_callback(
|
||||
OneshotTimerCallback::TestBindingCallback(cb),
|
||||
MsDuration::new(delay),
|
||||
Duration::from_millis(delay),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue