Skip to content

Commit

Permalink
mimic std's UNIX_EPOCH duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
museun committed Apr 20, 2023
1 parent d9afb74 commit 07c1ab2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ impl std::error::Error for SystemTimeError {
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
pub struct SystemTime(Duration);

pub const UNIX_EPOCH: SystemTime = SystemTime(Duration::from_secs(0));

impl SystemTime {
pub const UNIX_EPOCH: SystemTime = SystemTime(Duration::from_secs(0));
pub const UNIX_EPOCH: SystemTime = UNIX_EPOCH;

pub fn now() -> Self {
Self(MockClock::system_time())
Expand Down

0 comments on commit 07c1ab2

Please sign in to comment.