summaryrefslogtreecommitdiffstats
path: root/core/src/time.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-01-31 17:01:19 +0700
committerLibravatar GitHub <noreply@github.com>2022-01-31 17:01:19 +0700
commite4ef29ef20724c3d1a4beff39ddfdaf6d45f9683 (patch)
tree6e0c9c38366c9d70204c80fc66bd8e8a7652cf52 /core/src/time.rs
parentc75ed37148b019358b0297171cf31b2577eeb9ae (diff)
parent6f604ab3995cb345aacf183a569589988aa3ad1f (diff)
downloadiced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.tar.gz
iced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.tar.bz2
iced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.zip
Merge pull request #1096 from pacmancoder/feat/wgpu-webgl
Experimental WebGL wgpu backend support
Diffstat (limited to 'core/src/time.rs')
-rw-r--r--core/src/time.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/time.rs b/core/src/time.rs
new file mode 100644
index 00000000..f496d1a4
--- /dev/null
+++ b/core/src/time.rs
@@ -0,0 +1,9 @@
+//! Keep track of time, both in native and web platforms!
+
+#[cfg(target_arch = "wasm32")]
+pub use wasm_timer::Instant;
+
+#[cfg(not(target_arch = "wasm32"))]
+pub use std::time::Instant;
+
+pub use std::time::Duration;