mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 06:13:07 +00:00
Use web_time crate instead of std::time (#1481)
This commit is contained in:
parent
eff7cc0f58
commit
14bb5bdb82
@ -15,7 +15,7 @@ default = ["gate_testing", "parallel", "rand_chacha", "std", "timing"]
|
||||
gate_testing = []
|
||||
parallel = ["hashbrown/rayon", "plonky2_maybe_rayon/parallel"]
|
||||
std = ["anyhow/std", "rand/std", "itertools/use_std"]
|
||||
timing = ["std"]
|
||||
timing = ["std", "dep:web-time"]
|
||||
|
||||
[dependencies]
|
||||
ahash = { version = "0.8.3", default-features = false, features = ["compile-time-rng"] } # NOTE: Be sure to keep this version the same as the dependency in `hashbrown`.
|
||||
@ -34,6 +34,7 @@ serde = { version = "1.0", default-features = false, features = ["derive", "rc"]
|
||||
serde_json = "1.0"
|
||||
static_assertions = { version = "1.1.0", default-features = false }
|
||||
unroll = { version = "0.1.5", default-features = false }
|
||||
web-time = { version = "1.0.0", optional = true }
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
|
||||
getrandom = { version = "0.2", default-features = false, features = ["js"] }
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
use alloc::vec;
|
||||
use alloc::vec::Vec;
|
||||
#[cfg(feature = "timing")]
|
||||
use std::time::Instant;
|
||||
|
||||
use log::debug;
|
||||
use serde::Serialize;
|
||||
#[cfg(feature = "timing")]
|
||||
use web_time::Instant;
|
||||
|
||||
/// A method for deciding what arity to use at each reduction layer.
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Serialize)]
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#[cfg(feature = "timing")]
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use log::{log, Level};
|
||||
#[cfg(feature = "timing")]
|
||||
use web_time::{Duration, Instant};
|
||||
|
||||
/// The hierarchy of scopes, and the time consumed by each one. Useful for profiling.
|
||||
#[cfg(feature = "timing")]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user