Move disk writes to a queue
This commit is contained in:
parent
ce7c7a3f89
commit
b8bbe6a87f
3 changed files with 49 additions and 39 deletions
|
|
@ -25,7 +25,7 @@ pub(crate) struct PeerCountersAtomic {
|
|||
}
|
||||
|
||||
impl PeerCountersAtomic {
|
||||
pub(crate) fn on_piece_downloaded(&self, piece_len: u64, elapsed: Duration) {
|
||||
pub(crate) fn on_piece_completed(&self, piece_len: u64, elapsed: Duration) {
|
||||
#[allow(clippy::cast_possible_truncation)]
|
||||
let elapsed = elapsed.as_millis() as u64;
|
||||
self.total_piece_download_ms
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue