File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
library/std/src/sys/pal/hermit Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ struct Timespec {
1515}
1616
1717impl Timespec {
18+ #[ unstable( feature = "time_systemtime_limits" , issue = "none" ) ]
19+ const MAX : Timespec = Self :: new ( i64:: MAX , 1_000_000_000 - 1 ) ;
20+
21+ #[ unstable( feature = "time_systemtime_limits" , issue = "none" ) ]
22+ const MIN : Timespec = Self :: new ( i64:: MIN , 0 ) ;
23+
1824 const fn zero ( ) -> Timespec {
1925 Timespec { t : timespec { tv_sec : 0 , tv_nsec : 0 } }
2026 }
@@ -209,6 +215,12 @@ pub struct SystemTime(Timespec);
209215pub const UNIX_EPOCH : SystemTime = SystemTime ( Timespec :: zero ( ) ) ;
210216
211217impl SystemTime {
218+ #[ unstable( feature = "time_systemtime_limits" , issue = "none" ) ]
219+ pub const MAX : SystemTime = SystemTime { t : Timespec :: MAX } ;
220+
221+ #[ unstable( feature = "time_systemtime_limits" , issue = "none" ) ]
222+ pub const MIN : SystemTime = SystemTime { t : Timespec :: MIN } ;
223+
212224 pub fn new ( tv_sec : i64 , tv_nsec : i32 ) -> SystemTime {
213225 SystemTime ( Timespec :: new ( tv_sec, tv_nsec) )
214226 }
You can’t perform that action at this time.
0 commit comments