mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Replace time with std::time in components/devtools (#30927)
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
parent
d0998a771a
commit
65cbc95d38
7 changed files with 41 additions and 22 deletions
|
@ -12,6 +12,7 @@
|
|||
#![deny(unsafe_code)]
|
||||
|
||||
use std::net::TcpStream;
|
||||
use std::time::{Duration, SystemTime};
|
||||
|
||||
use bitflags::bitflags;
|
||||
use http::{HeaderMap, Method};
|
||||
|
@ -20,7 +21,6 @@ use malloc_size_of_derive::MallocSizeOf;
|
|||
use msg::constellation_msg::{BrowsingContextId, PipelineId};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_url::ServoUrl;
|
||||
use time::{self, Duration, Tm};
|
||||
use uuid::Uuid;
|
||||
|
||||
// Information would be attached to NewGlobal to be received and show in devtools.
|
||||
|
@ -306,7 +306,7 @@ pub struct HttpRequest {
|
|||
pub headers: HeaderMap,
|
||||
pub body: Option<Vec<u8>>,
|
||||
pub pipeline_id: PipelineId,
|
||||
pub startedDateTime: Tm,
|
||||
pub startedDateTime: SystemTime,
|
||||
pub timeStamp: i64,
|
||||
pub connect_time: u64,
|
||||
pub send_time: u64,
|
||||
|
@ -364,7 +364,7 @@ impl PreciseTime {
|
|||
}
|
||||
|
||||
pub fn to(&self, later: PreciseTime) -> Duration {
|
||||
Duration::nanoseconds((later.0 - self.0) as i64)
|
||||
Duration::from_nanos(later.0 - self.0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue