Skip to content

Commit 057ff62

Browse files
committed
pal/xous: Implement SystemTime::{MIN, MAX}
This commit implements `SystemTime::MIN` and `SystemTime::MAX` for xous. It is similar to wasip1, wasip2, and sgx in the sense of once again using a `Duration` to store the value.
1 parent 4920ee5 commit 057ff62

File tree

1 file changed

+6
-0
lines changed
  • library/std/src/sys/pal/xous

1 file changed

+6
-0
lines changed

library/std/src/sys/pal/xous/time.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ impl Instant {
3535
}
3636

3737
impl SystemTime {
38+
#[unstable(feature = "time_systemtime_limits", issue = "none")]
39+
pub const MAX: SystemTime = SystemTime(Duration::MAX);
40+
41+
#[unstable(feature = "time_systemtime_limits", issue = "none")]
42+
pub const MIN: SystemTime = SystemTime(Duration::ZERO);
43+
3844
pub fn now() -> SystemTime {
3945
let result = blocking_scalar(systime_server(), GetUtcTimeMs.into())
4046
.expect("failed to request utc time in ms");

0 commit comments

Comments
 (0)