pub mod time {
use std::time::{SystemTime, UNIX_EPOCH};
pub fn get_timestamp() -> Result<u64, String> {
match SystemTime::now().duration_since(UNIX_EPOCH) {
Ok(d) => {
return Ok(d.as_millis() as u64);
}
Err(e) => {
return Err(format!("get timestamp error:{:?}", e));
}
}
}
}