Home Reference Source Test
import {Clock} from '@mixer/cdk'
public class | source

Clock

Clock handles synchronizing the local time against the server, adjusting for any client-size clock skew.

Method Summary

Public Methods
public

Adjusts a timestamp created locally to the one on the remote server.

public

Adjusts a timestamp given by the remote server to the local timestamp.

Public Methods

public localToRemote(timestamp: number): Promise<number> source

Adjusts a timestamp created locally to the one on the remote server.

Params:

NameTypeAttributeDescription
timestamp number

Return:

Promise<number>

public remoteToLocal(timestamp: number): Promise<number> source

Adjusts a timestamp given by the remote server to the local timestamp.

Params:

NameTypeAttributeDescription
timestamp number

Return:

Promise<number>