diff --git a/Cargo.toml b/Cargo.toml index 42f78b808..c70129fe3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,6 +52,7 @@ tracing-futures = { version = "0.2", default-features = false, features = ["std- fnv = "1.0.5" slab = "0.4.2" indexmap = "1.0" +wasm-timer = { version = "0.2.5" } [dev-dependencies] diff --git a/src/proto/streams/recv.rs b/src/proto/streams/recv.rs index 682200d45..19b398379 100644 --- a/src/proto/streams/recv.rs +++ b/src/proto/streams/recv.rs @@ -5,10 +5,11 @@ use crate::{frame, proto}; use std::task::Context; use http::{HeaderMap, Request, Response}; +use wasm_timer::Instant; use std::io; use std::task::{Poll, Waker}; -use std::time::{Duration, Instant}; +use std::time::Duration; #[derive(Debug)] pub(super) struct Recv { diff --git a/src/proto/streams/stream.rs b/src/proto/streams/stream.rs index 5bbda250c..ada60cd5b 100644 --- a/src/proto/streams/stream.rs +++ b/src/proto/streams/stream.rs @@ -1,7 +1,8 @@ use super::*; +use wasm_timer::Instant; + use std::task::{Context, Waker}; -use std::time::Instant; use std::usize; /// Tracks Stream related state