Timestamp
Calls
set
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
.
Namespace
api.tx.timestamp.set
Type
function set(
now: Compact<u64>
)
Storage
didUpdate
Did the timestamp get updated in this block?
Namespace
api.query.timestamp.didUpdate
Type
function didUpdate(
): bool
now
Current time for the current block.
Namespace
api.query.timestamp.now
Type
function now(
): u64
undefinedundefined## Constants
minimumPeriod
The minimum period between blocks. Beware that this is different to the expected period that the block production apparatus provides. Your chosen consensus system will generally work with this to determine a sensible block time. e.g. For Aura, it will be double this period on default settings.
Namespace
api.consts.timestamp.minimumPeriod
Type
type minimumPeriod = u64