From ffea84b64aa172b9b153a76588f4f609bf15c441 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sat, 15 May 2021 17:23:31 +0200 Subject: [PATCH] Use Instant instead of SystemTime to measure elapsed time --- matrix_sdk_base/src/store/sled_store/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix_sdk_base/src/store/sled_store/mod.rs b/matrix_sdk_base/src/store/sled_store/mod.rs index cace1128..973360cc 100644 --- a/matrix_sdk_base/src/store/sled_store/mod.rs +++ b/matrix_sdk_base/src/store/sled_store/mod.rs @@ -19,7 +19,7 @@ use std::{ convert::TryFrom, path::{Path, PathBuf}, sync::Arc, - time::SystemTime, + time::Instant, }; use futures::{ @@ -286,7 +286,7 @@ impl SledStore { } pub async fn save_changes(&self, changes: &StateChanges) -> Result<()> { - let now = SystemTime::now(); + let now = Instant::now(); let ret: Result<(), TransactionError> = ( &self.session,