More code refactoring to integrate Duration (#8322)

* More code refactoring to integrate Duration

* Fix typo

* Fix tests

* More test fix
This commit is contained in:
Pierre Krieger
2018-04-14 21:35:58 +02:00
committed by Marek Kotewicz
parent 90eb61091a
commit fac356c701
28 changed files with 185 additions and 147 deletions

View File

@@ -71,7 +71,7 @@ impl TestProtocol {
impl NetworkProtocolHandler for TestProtocol {
fn initialize(&self, io: &NetworkContext, _host_info: &HostInfo) {
io.register_timer(0, 10).unwrap();
io.register_timer(0, Duration::from_millis(10)).unwrap();
}
fn read(&self, _io: &NetworkContext, _peer: &PeerId, packet_id: u8, data: &[u8]) {