File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,10 @@ impl Thread {
30
30
let nanos = dur. as_nanos ( ) ;
31
31
assert ! ( nanos <= u64 :: max_value( ) as u128 ) ;
32
32
33
+ const CLOCK_ID : wasi:: Userdata = 0x0123_45678 ;
34
+
33
35
let clock = wasi:: raw:: __wasi_subscription_u_clock_t {
34
- identifier : 0x0123_45678 ,
36
+ identifier : CLOCK_ID ,
35
37
clock_id : wasi:: CLOCK_MONOTONIC ,
36
38
timeout : nanos as u64 ,
37
39
precision : 0 ,
@@ -47,7 +49,7 @@ impl Thread {
47
49
let n = wasi:: poll_oneoff ( & in_, & mut out) . unwrap ( ) ;
48
50
let wasi:: Event { userdata, error, type_, .. } = out[ 0 ] ;
49
51
match ( n, userdata, error) {
50
- ( 1 , 0x0123_45678 , 0 ) if type_ == wasi:: EVENTTYPE_CLOCK => { }
52
+ ( 1 , CLOCK_ID , 0 ) if type_ == wasi:: EVENTTYPE_CLOCK => { }
51
53
_ => panic ! ( "thread::sleep(): unexpected result of poll_oneoff" ) ,
52
54
}
53
55
}
You can’t perform that action at this time.
0 commit comments