diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-15 16:21:41 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-15 16:21:41 +0100 |
commit | 3bf2df622a070fe8f233bec6d60bd5cca995fbfc (patch) | |
tree | 65ba71d4b950208c177a96ba34b797f18e732d5b /src/util/data.rs | |
parent | 097c339d981dba0420af17d30d1221181d8bf1d7 (diff) | |
download | garage-3bf2df622a070fe8f233bec6d60bd5cca995fbfc.tar.gz garage-3bf2df622a070fe8f233bec6d60bd5cca995fbfc.zip |
Time and metadata improvements
Diffstat (limited to 'src/util/data.rs')
-rw-r--r-- | src/util/data.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/util/data.rs b/src/util/data.rs index 0dbd6df4..591b7605 100644 --- a/src/util/data.rs +++ b/src/util/data.rs @@ -2,7 +2,6 @@ use rand::Rng; use serde::de::{self, Visitor}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use std::fmt; -use std::time::{SystemTime, UNIX_EPOCH}; #[derive(Default, PartialOrd, Ord, Clone, Hash, PartialEq, Copy)] pub struct FixedBytes32([u8; 32]); @@ -119,13 +118,6 @@ pub fn gen_uuid() -> UUID { rand::thread_rng().gen::<[u8; 32]>().into() } -pub fn now_msec() -> u64 { - SystemTime::now() - .duration_since(UNIX_EPOCH) - .expect("Fix your clock :o") - .as_millis() as u64 -} - // RMP serialization with names of fields and variants pub fn rmp_to_vec_all_named<T>(val: &T) -> Result<Vec<u8>, rmp_serde::encode::Error> |