Use Instant instead of SystemTime to measure elapsed time
parent
15540e84e3
commit
ffea84b64a
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue