Stop using time@0.1 in Servo (#33394)

This removes the last few uses of `time@0.1` in Servo. There are still
dependencies from `style` and `webrender`, but they will be removed soon
as well. The uses of this version of `time` are replaced with
`std::time` types and `time@0.3` when negative `Duration` is necessary.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2024-09-11 00:09:56 -07:00 committed by GitHub
parent 095590e224
commit bc8d8b62c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 88 additions and 103 deletions

View file

@ -9,7 +9,7 @@ use std::mem;
use std::net::TcpStream;
use std::sync::{Arc, Mutex};
use devtools_traits::PreciseTime;
use base::cross_process_instant::CrossProcessInstant;
use log::{debug, warn};
use serde_json::{Map, Value};
@ -60,7 +60,7 @@ pub struct ActorRegistry {
script_actors: RefCell<HashMap<String, String>>,
shareable: Option<Arc<Mutex<ActorRegistry>>>,
next: Cell<u32>,
start_stamp: PreciseTime,
start_stamp: CrossProcessInstant,
}
impl ActorRegistry {
@ -73,7 +73,7 @@ impl ActorRegistry {
script_actors: RefCell::new(HashMap::new()),
shareable: None,
next: Cell::new(0),
start_stamp: PreciseTime::now(),
start_stamp: CrossProcessInstant::now(),
}
}
@ -104,7 +104,7 @@ impl ActorRegistry {
}
/// Get start stamp when registry was started
pub fn start_stamp(&self) -> PreciseTime {
pub fn start_stamp(&self) -> CrossProcessInstant {
self.start_stamp
}