LocalTimestampProvider class

Implements a local timestamp provider for testing purposes.

Remarks

This implementation does not derive from TimestampProvider class as it doesn't need to be started.

Methods

getMaxTimestampError()

Returns the maximum number of milliseconds a returned timestamp can be off from the source.

getTimestamp()

Returns the current timestamp as the number of milliseconds sine the Unix Epoch.

Constructor Details

LocalTimestampProvider(boolean)

new LocalTimestampProvider(noWarn?: boolean)

Parameters

noWarn

boolean

Method Details

getMaxTimestampError()

Returns the maximum number of milliseconds a returned timestamp can be off from the source.

function getMaxTimestampError(): number

Returns

number

getTimestamp()

Returns the current timestamp as the number of milliseconds sine the Unix Epoch.

function getTimestamp(): number

Returns

number