Skip to content

Commit

Permalink
Don't query the time on zkvm. (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
orlp authored Oct 27, 2024
1 parent 45a79dc commit da65bc3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/seed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ mod global {
// current time and an address from the allocator.
#[cfg(feature = "std")]
{
#[cfg(not(any(miri, all(target_family = "wasm", target_os = "unknown"))))]
#[cfg(not(any(
miri,
all(target_family = "wasm", target_os = "unknown"),
target_os = "zkvm"
)))]
if let Ok(duration) = std::time::UNIX_EPOCH.elapsed() {
seed = mix(seed, duration.subsec_nanos() as u64);
seed = mix(seed, duration.as_secs());
Expand Down

0 comments on commit da65bc3

Please sign in to comment.