diff --git a/frame/timestamp/src/lib.rs b/frame/timestamp/src/lib.rs index 301d993c09b78..ce6fd09bb7828 100644 --- a/frame/timestamp/src/lib.rs +++ b/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); }