Switch to wasm-timer (#1071)

This commit is contained in:
Pierre Krieger
2019-04-25 15:08:06 +02:00
committed by GitHub
parent 9a525d5dea
commit ce4ca3cc75
20 changed files with 36 additions and 33 deletions

View File

@ -30,9 +30,9 @@ use libp2p_core::{
},
upgrade::{DeniedUpgrade, OutboundUpgrade}
};
use std::{io, marker::PhantomData, time::{Duration, Instant}};
use std::{io, marker::PhantomData, time::Duration};
use tokio_io::{AsyncRead, AsyncWrite};
use tokio_timer::{self, Delay};
use wasm_timer::{Delay, Instant};
use void::{Void, unreachable};
/// Delay between the moment we connect and the first time we identify.
@ -90,7 +90,7 @@ where
{
type InEvent = Void;
type OutEvent = PeriodicIdHandlerEvent;
type Error = tokio_timer::Error;
type Error = wasm_timer::Error;
type Substream = TSubstream;
type InboundProtocol = DeniedUpgrade;
type OutboundProtocol = IdentifyProtocolConfig;