Class: TimeSource
Shared time source that synchronizes Producer and Client to a common clock.
The Producer reads from this to timestamp samples, while the Client updates it when synchronized with the server's reference clock.
Example
const timeSource = new TimeSource()
const producer = new Producer(timeSource)
const client = new Client(config, channelProducer, namespace, timeSource)
Methods
wallclock()
wallclock():
number
Get the current wallclock time in milliseconds.
Returns
number