File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
name = " wasm-timer"
3
3
edition = " 2018"
4
4
description = " Abstraction over std::time::Instant and futures-timer that works on WASM"
5
- version = " 0.2.3 "
5
+ version = " 0.2.4 "
6
6
authors = [" Pierre Krieger <pierre.krieger1708@gmail.com>" ]
7
7
license = " MIT"
8
8
repository = " https://github.com/tomaka/wasm-timer"
Original file line number Diff line number Diff line change 1
- use futures:: task:: ArcWake ;
1
+ use futures:: task:: { self , ArcWake } ;
2
2
use parking_lot:: Mutex ;
3
3
use std:: convert:: TryFrom ;
4
4
use std:: future:: Future ;
@@ -33,7 +33,7 @@ fn schedule_callback(timer: Arc<Mutex<Timer>>, when: Duration) {
33
33
// We start by polling the timer. If any new `Delay` is created, the waker will be used
34
34
// to wake up this task pre-emptively. As such, we pass a `Waker` that calls
35
35
// `schedule_callback` with a delay of `0`.
36
- let waker = Arc :: new ( Waker { timer : timer. clone ( ) } ) . into_waker ( ) ;
36
+ let waker = task :: waker ( Arc :: new ( Waker { timer : timer. clone ( ) } ) ) ;
37
37
let _ = Future :: poll ( Pin :: new ( & mut * timer_lock) , & mut Context :: from_waker ( & waker) ) ;
38
38
39
39
// Notify the timers that are ready.
You can’t perform that action at this time.
0 commit comments