Replace time with std::time in components/devtools (#30927)

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
Taym Haddadi 2024-01-03 17:52:04 +01:00 committed by GitHub
parent d0998a771a
commit 65cbc95d38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 22 deletions

View file

@ -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)
}