Function pallet_timestamp::pallet::dispatchables::set
source · pub fn set<T: Config>(now: T::Moment)
Expand description
Set the current time.
This call should be invoked exactly once per block. It will panic at the finalization phase, if this call hasn’t been invoked by that time.
The timestamp should be greater than the previous one by the amount specified by
MinimumPeriod
.
The dispatch origin for this call must be Inherent
.
Complexity
O(1)
(Note that implementations ofOnTimestampSet
must also beO(1)
)- 1 storage read and 1 storage mutation (codec
O(1)
). (because ofDidUpdate::take
inon_finalize
) - 1 event handler
on_timestamp_set
. Must beO(1)
.
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::set
.