summaryrefslogtreecommitdiffstats
path: root/core/src/time.rs
diff options
context:
space:
mode:
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;