use constant durations (#8278)

* use constant durations

* fix CI

* address comments
This commit is contained in:
Ryan Leung
2018-04-02 16:47:56 +08:00
committed by Tomasz Drwięga
parent 68a08df9c3
commit 9c9ddaccec
12 changed files with 88 additions and 84 deletions

View File

@@ -38,7 +38,7 @@ const TOKEN: TimerToken = 1;
const TIMEOUT_MS: u64 = 1000 * 60 * 10;
// But make each attempt last only 9 minutes
const PURGE_TIMEOUT_MS: u64 = 1000 * 60 * 9;
const PURGE_TIMEOUT: Duration = Duration::from_millis(1000 * 60 * 9);
/// Periodically culls the transaction queue of mined transactions.
pub struct QueueCull<T> {
@@ -100,6 +100,6 @@ impl<T: LightChainClient + 'static> IoHandler<ClientIoMessage> for QueueCull<T>
future::Either::B(future::ok(()))
},
}
}, Duration::from_millis(PURGE_TIMEOUT_MS), || {})
}, PURGE_TIMEOUT, || {})
}
}