Skip to main content

Clock

Namespace: IotaSdk

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

public class Clock : IClock, System.IDisposable

Inheritance ObjectClock
Implements IClock, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors

Clock(UInt64)

public Clock(ulong pointer)

Parameters

pointer UInt64

Methods

Destroy()

public void Destroy()

Dispose()

public void Dispose()

Id()

The object's ID.

public ObjectId Id()

Returns

ObjectId

TimestampMs()

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

public ulong TimestampMs()

Returns

UInt64

TryFromBcs(Byte[])

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

public static Clock TryFromBcs(Byte[] bytes)

Parameters

bytes Byte[]

Returns

Clock

Exceptions

SdkFfiException

TryFromObject(Object)

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

public static Clock TryFromObject(Object object)

Parameters

object Object

Returns

Clock

Exceptions

SdkFfiException