mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +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
|
@ -106,10 +106,7 @@ pub struct HighResolutionStamp(f64);
|
|||
|
||||
impl HighResolutionStamp {
|
||||
pub fn new(start_stamp: PreciseTime, time: PreciseTime) -> HighResolutionStamp {
|
||||
let duration = start_stamp
|
||||
.to(time)
|
||||
.num_microseconds()
|
||||
.expect("Too big duration in microseconds");
|
||||
let duration = start_stamp.to(time).as_micros();
|
||||
HighResolutionStamp(duration as f64 / 1000 as f64)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue