From b357e24e445855ecfb82d158fce7dc34793c66e4 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Mon, 9 Jan 2023 09:33:28 +0000 Subject: [PATCH] Replace `std::time::Instant` with `trice::Instant` --- lib/src/api/engine/remote/ws/native.rs | 2 +- lib/src/api/engine/remote/ws/wasm.rs | 2 +- lib/src/ctx/cancellation.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/api/engine/remote/ws/native.rs b/lib/src/api/engine/remote/ws/native.rs index 4f982e43..22563ead 100644 --- a/lib/src/api/engine/remote/ws/native.rs +++ b/lib/src/api/engine/remote/ws/native.rs @@ -40,7 +40,6 @@ use std::mem; use std::pin::Pin; use std::sync::atomic::AtomicI64; use std::sync::Arc; -use std::time::Instant; use tokio::net::TcpStream; use tokio::time; use tokio::time::MissedTickBehavior; @@ -51,6 +50,7 @@ use tokio_tungstenite::tungstenite::Message; use tokio_tungstenite::Connector; use tokio_tungstenite::MaybeTlsStream; use tokio_tungstenite::WebSocketStream; +use trice::Instant; use url::Url; type WsResult = std::result::Result; diff --git a/lib/src/api/engine/remote/ws/wasm.rs b/lib/src/api/engine/remote/ws/wasm.rs index b8e43e33..ff118d1f 100644 --- a/lib/src/api/engine/remote/ws/wasm.rs +++ b/lib/src/api/engine/remote/ws/wasm.rs @@ -39,10 +39,10 @@ use std::marker::PhantomData; use std::pin::Pin; use std::sync::atomic::AtomicI64; use std::sync::Arc; -use std::time::Instant; use tokio::time; use tokio::time::MissedTickBehavior; use tokio_stream::wrappers::IntervalStream; +use trice::Instant; use wasm_bindgen_futures::spawn_local; use ws_stream_wasm::WsEvent; use ws_stream_wasm::WsMessage as Message; diff --git a/lib/src/ctx/cancellation.rs b/lib/src/ctx/cancellation.rs index 9caf3ec0..9b54387a 100644 --- a/lib/src/ctx/cancellation.rs +++ b/lib/src/ctx/cancellation.rs @@ -1,6 +1,6 @@ use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; -use std::time::Instant; +use trice::Instant; /// A 'static view into the cancellation status of a Context. #[derive(Clone, Debug, Default)]