Format code
This commit is contained in:
@ -1,2 +1,2 @@
|
||||
use std::error::Error;
|
||||
pub type Res<A = ()> = Result<A, Box<dyn Error>>;
|
||||
pub type Res<A = ()> = Result<A, Box<dyn Error>>;
|
||||
|
@ -1,2 +1,2 @@
|
||||
pub mod err;
|
||||
pub mod time;
|
||||
pub mod time;
|
||||
|
@ -2,5 +2,8 @@ use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
/// Get the current time since epoch
|
||||
pub fn time() -> u64 {
|
||||
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()
|
||||
}
|
||||
SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.unwrap()
|
||||
.as_secs()
|
||||
}
|
||||
|
Reference in New Issue
Block a user