Skip to content

Commit a4036f5

Browse files
committed
Rework for stable futures
1 parent fd76bd4 commit a4036f5

File tree

3 files changed

+11
-419
lines changed

3 files changed

+11
-419
lines changed

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[package]
22
name = "wasm-timer"
33
edition = "2018"
4-
description = "Abstraction over std::time::Instant and tokio_timer that works on WASM"
5-
version = "0.1.2"
4+
description = "Abstraction over std::time::Instant and futures-timer that works on WASM"
5+
version = "0.2.0"
66
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
77
license = "MIT"
88
repository = "https://github.com/tomaka/wasm-timer"
99

10+
[dependencies]
11+
futures-preview = "0.3.0-alpha"
12+
pin-utils = "0.1.0-alpha.4"
13+
1014
[target.'cfg(any(target_arch = "wasm32"))'.dependencies]
11-
futures = "0.1"
1215
js-sys = "0.3.14"
1316
send_wrapper = "0.2"
1417
wasm-bindgen = "0.2.37"
1518
web-sys = { version = "0.3.14", features = ["Performance", "Window"] }
16-
17-
[target.'cfg(not(any(target_arch = "wasm32")))'.dependencies]
18-
tokio-timer = "0.2"

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1919
// DEALINGS IN THE SOFTWARE.
2020

21+
pub use timer::*;
22+
2123
#[cfg(not(target_arch = "wasm32"))]
2224
pub use std::time::{Instant, SystemTime, UNIX_EPOCH};
23-
#[cfg(not(target_arch = "wasm32"))]
24-
pub use tokio_timer::*;
2525
#[cfg(target_arch = "wasm32")]
2626
pub use wasm::*;
2727

28+
mod timer;
2829
#[cfg(target_arch = "wasm32")]
2930
mod wasm;

0 commit comments

Comments
 (0)