Skip to main content

Clock

open class Clock : Disposable, AutoCloseable, ClockInterface

A typed view of the on-chain 0x2::clock::Clock object (the 0x6 singleton carrying the consensus timestamp).

Functions

NameSummary
close@Synchronized
open override fun close()
destroyopen override fun destroy()
idopen override fun id(): ObjectId
The object's ID.
timestampMsopen override fun timestampMs(): ULong
The clock's timestamp (ms), set by consensus every commit.
toStringopen override fun toString(): String

Companion object functions

NameSummary
tryFromBcsfun tryFromBcs(bytes: ByteArray): Clock
Decode from BCS bytes, without validating the on-chain type tag.
tryFromObjectfun tryFromObject(object: Object): Clock
Decode from an on-chain object, validating its Move type tag.