Skip to main content

Clock

type Clock

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

type Clock struct {
// contains filtered or unexported fields
}

func ClockTryFromBcs

func ClockTryFromBcs(bytes []byte) (*Clock, error)

Decode from BCS bytes, without validating the on-chain type tag.

func ClockTryFromObject

func ClockTryFromObject(object *Object) (*Clock, error)

Decode from an on-chain object, validating its Move type tag.

func LiftFromExternalClock

func LiftFromExternalClock(handle uint64) *Clock

func (*Clock) DebugString

func (_self *Clock) DebugString() string

func (*Clock) Destroy

func (object *Clock) Destroy()

func (*Clock) Id

func (_self *Clock) Id() *ObjectId

The object's ID.

func (*Clock) TimestampMs

func (_self *Clock) TimestampMs() uint64

The clock's timestamp (ms), set by consensus every commit.