Constructors

Methods

Constructors

Methods

  • Returns the current time adjusted to server-time.

    Parameters

    • clientCurrentTime: number = ...

      The current time on the client side. Defaults to Date.now().

    Returns number

    The current adjusted time (or the client time if not synced yet).

  • Synchronizes the client's time with the server's time. If the client's time is already synchronized within an hour, this method does nothing.

    Returns Promise<void>

    A promise that resolves when the synchronization is complete.

  • Returns the timestamp of a performance mark with the specified name and detail. PS: performance.mark must be called with startTime: trueTime.now().

    Parameters

    • markName: string

      The name of the performance mark.

    • Optionaldetail: string

      Optional. The detail of the performance mark.

    Returns undefined | number

    The timestamp of the performance mark, or undefined if not found.

    ReferenceError if the performance mark is not found.