File tree Expand file tree Collapse file tree 5 files changed +5
-20
lines changed Expand file tree Collapse file tree 5 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use super::hermit_abi;
44use crate :: ffi:: CStr ;
55use crate :: mem:: ManuallyDrop ;
66use crate :: num:: NonZero ;
7- use crate :: time:: { Duration , Instant } ;
7+ use crate :: time:: Duration ;
88use crate :: { io, ptr} ;
99
1010pub type Tid = hermit_abi:: Tid ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use super::unsupported;
55use crate :: ffi:: CStr ;
66use crate :: io;
77use crate :: num:: NonZero ;
8- use crate :: time:: { Duration , Instant } ;
8+ use crate :: time:: Duration ;
99
1010pub struct Thread ( task_queue:: JoinHandle ) ;
1111
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use crate::ffi::CStr;
22use crate :: mem:: { self , ManuallyDrop } ;
33use crate :: num:: NonZero ;
44use crate :: sys:: os;
5- use crate :: time:: { Duration , Instant } ;
5+ use crate :: time:: Duration ;
66use crate :: { cmp, io, ptr} ;
77
88pub const DEFAULT_MIN_STACK_SIZE : usize = 8 * 1024 ;
@@ -109,14 +109,6 @@ impl Thread {
109109 }
110110 }
111111
112- pub fn sleep_until ( deadline : Instant ) {
113- let now = Instant :: now ( ) ;
114-
115- if let Some ( delay) = deadline. checked_duration_since ( now) {
116- Self :: sleep ( delay) ;
117- }
118- }
119-
120112 /// must join, because no pthread_detach supported
121113 pub fn join ( self ) {
122114 let id = self . into_id ( ) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use crate::ffi::CStr;
33use crate :: io;
44use crate :: num:: NonZero ;
55use crate :: ptr:: NonNull ;
6- use crate :: time:: { Duration , Instant } ;
6+ use crate :: time:: Duration ;
77
88pub struct Thread ( !) ;
99
@@ -39,14 +39,6 @@ impl Thread {
3939 }
4040 }
4141
42- pub fn sleep_until ( deadline : Instant ) {
43- let now = Instant :: now ( ) ;
44-
45- if let Some ( delay) = deadline. checked_duration_since ( now) {
46- sleep ( delay) ;
47- }
48- }
49-
5042 pub fn join ( self ) {
5143 self . 0
5244 }
Original file line number Diff line number Diff line change @@ -297,6 +297,7 @@ impl Thread {
297297 }
298298
299299 #[ cfg( not( any(
300+ target_vendor = "apple" ,
300301 target_os = "freebsd" ,
301302 target_os = "netbsd" ,
302303 target_os = "linux" ,
You can’t perform that action at this time.
0 commit comments