#[cfg(not(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))))]
pub use std::time::{Duration, Instant, SystemTime, SystemTimeError};
#[cfg(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none")))]
pub use web_time::{Duration, Instant, SystemTime, SystemTimeError};
#[cfg(not(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
)))]
pub async fn sleep(duration: Duration) {
tokio::time::sleep(duration).await;
}
#[cfg(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
))]
pub async fn sleep(duration: Duration) {
gloo_timers::future::sleep(duration).await;
}
#[cfg(not(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
)))]
pub trait MaybeSend: Send {}
#[cfg(not(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
)))]
impl<T: Send> MaybeSend for T {}
#[cfg(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
))]
pub trait MaybeSend {}
#[cfg(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
))]
impl<T> MaybeSend for T {}
#[cfg(not(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
)))]
pub trait MaybeSendSync: Send + Sync {}
#[cfg(not(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
)))]
impl<T: Send + Sync> MaybeSendSync for T {}
#[cfg(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
))]
pub trait MaybeSendSync {}
#[cfg(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
))]
impl<T> MaybeSendSync for T {}
#[cfg(not(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
)))]
pub trait MaybeSync: Sync {}
#[cfg(not(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
)))]
impl<T: Sync> MaybeSync for T {}
#[cfg(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
))]
pub trait MaybeSync {}
#[cfg(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
))]
impl<T> MaybeSync for T {}
#[cfg(not(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
)))]
pub trait MaybeSendFuture: Future + Send {}
#[cfg(not(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
)))]
impl<T: Future + Send> MaybeSendFuture for T {}
#[cfg(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
))]
pub trait MaybeSendFuture: Future {}
#[cfg(any(
doc,
all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none"))
))]
impl<T: Future> MaybeSendFuture for T {}