summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/lib.rs1
-rw-r--r--core/src/time.rs7
2 files changed, 8 insertions, 0 deletions
diff --git a/core/src/lib.rs b/core/src/lib.rs
index b76c6d20..2a4e6158 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -17,6 +17,7 @@
pub mod alignment;
pub mod keyboard;
pub mod mouse;
+pub mod time;
mod background;
mod color;
diff --git a/core/src/time.rs b/core/src/time.rs
new file mode 100644
index 00000000..5f95ee86
--- /dev/null
+++ b/core/src/time.rs
@@ -0,0 +1,7 @@
+//! Keep track of time, both in native and web platforms!
+
+#[cfg(target_arch = "wasm32")]
+pub use instant::{Duration, Instant};
+
+#[cfg(not(target_arch = "wasm32"))]
+pub use std::time::{Duration, Instant};