Partager via


HostTimestampProvider class

Timestamp Provider that calls the Live Share Host to lookup the current time.

Extends

Constructors

HostTimestampProvider(ILiveShareHost)

Creates a new DefaultTimestampProvider instance.

Properties

isRunning

Returns true if the provider has been started.

Inherited Methods

getMaxTimestampError()

Returns the maximum amount of error, in milliseconds.

getTimestamp()

Returns the current server time as a UTC tick.

start()

Starts the provider.

stop()

Stops the provider if its running.

Constructor Details

HostTimestampProvider(ILiveShareHost)

Creates a new DefaultTimestampProvider instance.

new HostTimestampProvider(host: ILiveShareHost)

Parameters

host
ILiveShareHost

The current Live Share Host instance.

Property Details

isRunning

Returns true if the provider has been started.

boolean isRunning

Property Value

boolean

Inherited Method Details

getMaxTimestampError()

Returns the maximum amount of error, in milliseconds.

function getMaxTimestampError(): number

Returns

number

Inherited From TimestampProvider.getMaxTimestampError

getTimestamp()

Returns the current server time as a UTC tick.

function getTimestamp(): number

Returns

number

Inherited From TimestampProvider.getTimestamp

start()

Starts the provider.

function start(): Promise<void>

Returns

Promise<void>

Inherited From TimestampProvider.start

stop()

Stops the provider if its running.

function stop()

Inherited From TimestampProvider.stop