#[cfg(not(all(spawned_sim, feature = "async")))]
pub use std::time::Instant;
#[cfg(all(spawned_sim, feature = "async"))]
pub use crate::tasks::sim::Instant;
pub fn entropy() -> u64 {
#[cfg(all(spawned_sim, feature = "async"))]
{
crate::tasks::sim::entropy()
}
#[cfg(not(all(spawned_sim, feature = "async")))]
{
static NEXT: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(1);
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap_or_default()
.as_nanos() as u64
^ NEXT.fetch_add(1, std::sync::atomic::Ordering::Relaxed)
}
}