diff --git a/core/node/state_keeper/src/utils.rs b/core/node/state_keeper/src/utils.rs index eca73b6e3800..bb5678e0c59a 100644 --- a/core/node/state_keeper/src/utils.rs +++ b/core/node/state_keeper/src/utils.rs @@ -6,14 +6,13 @@ pub(super) fn is_canceled(stop_receiver: &watch::Receiver) -> bool { *stop_receiver.borrow() } -// TODO (SMA-1206): use seconds instead of milliseconds. -pub(super) fn millis_since_epoch() -> u128 { +pub(super) fn seconds_since_epoch() -> u64 { SystemTime::now() .duration_since(UNIX_EPOCH) .expect("Incorrect system time") - .as_millis() + .as_secs() } pub(super) fn millis_since(since: u64) -> u64 { - (millis_since_epoch() - since as u128 * 1000) as u64 + (seconds_since_epoch() - since) * 1000 }