diff options
author | Joel Galenson <jgalenson@google.com> | 2021-08-13 02:56:19 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-08-13 02:56:19 +0000 |
commit | 525c91084ac5b2126b4148f83d44e5960634f64b (patch) | |
tree | 6497382f249fbcdca1698acf20570e87816cea15 | |
parent | a18edb3289aec2ac3b8adcc24ddf8c70b717a0bc (diff) | |
parent | 26af6ce12aa08521b4d5b259ca875e19b9a187fe (diff) | |
download | instant-525c91084ac5b2126b4148f83d44e5960634f64b.tar.gz |
Upgrade rust/crates/instant to 0.1.10 am: 0228b9e3fe am: dc4f7a4c49 am: 9780a94e21 am: 26af6ce12a
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/instant/+/1790989
Change-Id: I58e977a666712f4c39654c904487a13f2b61e1f1
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 1 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | Cargo.toml.orig | 2 | ||||
-rw-r--r-- | METADATA | 10 | ||||
-rw-r--r-- | src/wasm.rs | 8 |
6 files changed, 16 insertions, 9 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 0fa03ad..56bc629 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "eff71cffcc21f0b6d84a7dc3009cacb9ff16b4ea" + "sha1": "1f72ffddf0dbc4e6905d8543d113324d6967e038" } } @@ -1,4 +1,5 @@ // This file is generated by cargo2android.py --run --device --dependencies. +// Do not modify this file as changes will be overridden on upgrade. package { default_applicable_licenses: ["external_rust_crates_instant_license"], @@ -13,7 +13,7 @@ [package] edition = "2018" name = "instant" -version = "0.1.9" +version = "0.1.10" authors = ["sebcrozet <developer@crozet.re>"] description = "A partial replacement for std::time::Instant that works on WASM too." readme = "README.md" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index f6be57f..7cd1dc4 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "instant" -version = "0.1.9" +version = "0.1.10" authors = ["sebcrozet <developer@crozet.re>"] description = "A partial replacement for std::time::Instant that works on WASM too." repository = "https://github.com/sebcrozet/instant" @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/instant/instant-0.1.9.crate" + value: "https://static.crates.io/crates/instant/instant-0.1.10.crate" } - version: "0.1.9" + version: "0.1.10" license_type: NOTICE last_upgrade_date { - year: 2020 - month: 11 - day: 19 + year: 2021 + month: 8 + day: 9 } } diff --git a/src/wasm.rs b/src/wasm.rs index 986bbf6..57ea39c 100644 --- a/src/wasm.rs +++ b/src/wasm.rs @@ -128,11 +128,17 @@ pub fn now() -> f64 { #[cfg(not(any(feature = "wasm-bindgen", feature = "stdweb")))] mod js { extern "C" { + #[cfg(not(target_os = "emscripten"))] pub fn now() -> f64; + #[cfg(target_os = "emscripten")] + pub fn _emscripten_get_now() -> f64; } } // Make the unsafe extern function "safe" so it can be called like the other 'now' functions #[cfg(not(any(feature = "wasm-bindgen", feature = "stdweb")))] pub fn now() -> f64 { - unsafe { js::now() } + #[cfg(not(target_os = "emscripten"))] + return unsafe { js::now() }; + #[cfg(target_os = "emscripten")] + return unsafe { js::_emscripten_get_now() }; } |