Use Instant instead of SystemTime to measure elapsed time

master
Jonas Platte 2021-05-15 17:23:31 +02:00
parent 15540e84e3
commit ffea84b64a
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
1 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ use std::{
convert::TryFrom, convert::TryFrom,
path::{Path, PathBuf}, path::{Path, PathBuf},
sync::Arc, sync::Arc,
time::SystemTime, time::Instant,
}; };
use futures::{ use futures::{
@ -286,7 +286,7 @@ impl SledStore {
} }
pub async fn save_changes(&self, changes: &StateChanges) -> Result<()> { pub async fn save_changes(&self, changes: &StateChanges) -> Result<()> {
let now = SystemTime::now(); let now = Instant::now();
let ret: Result<(), TransactionError<SerializationError>> = ( let ret: Result<(), TransactionError<SerializationError>> = (
&self.session, &self.session,