Add support for Instant for wasm32.

This commit is contained in:
Stephen Chung
2020-06-17 16:50:57 +08:00
parent ae6d5e13a9
commit 2a73841549
5 changed files with 12 additions and 7 deletions

View File

@@ -27,6 +27,10 @@ use crate::stdlib::{
#[cfg(not(target_arch = "wasm32"))]
use crate::stdlib::time::Instant;
#[cfg(not(feature = "no_std"))]
#[cfg(target_arch = "wasm32")]
use instant::Instant;
/// Trait to represent any type.
///
/// Currently, `Variant` is not `Send` nor `Sync`, so it can practically be any type.