Skip to content

Commit

Permalink
Fix SystemTime::elapsed()
Browse files Browse the repository at this point in the history
Fix #52
  • Loading branch information
sebcrozet committed May 17, 2024
1 parent 78e336d commit 5f6d4bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl SystemTime {
}

pub fn elapsed(&self) -> Result<Duration, ()> {
self.duration_since(SystemTime::now())
Self::now().duration_since(*self)
}

pub fn checked_add(&self, duration: Duration) -> Option<SystemTime> {
Expand Down

0 comments on commit 5f6d4bb

Please sign in to comment.