diff --git a/substrate/frame/timestamp/src/lib.rs b/substrate/frame/timestamp/src/lib.rs index 301d993c09..ce6fd09bb7 100644 --- a/substrate/frame/timestamp/src/lib.rs +++ b/substrate/frame/timestamp/src/lib.rs @@ -258,7 +258,7 @@ impl Pallet { } /// Set the timestamp to something in particular. Only used for tests. - #[cfg(feature = "std")] + #[cfg(any(feature = "runtime-benchmarks", feature = "std"))] pub fn set_timestamp(now: T::Moment) { Now::::put(now); }