diff --git a/frame/timestamp/src/lib.rs b/frame/timestamp/src/lib.rs index dabf5a93c13d1..8d4baeeacc9ab 100644 --- a/frame/timestamp/src/lib.rs +++ b/frame/timestamp/src/lib.rs @@ -254,7 +254,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); }