type Milliseconds = number;
/**
 * A `SynchronizedClock` allows for approximating the time on a remote machine.
 *
 * During initialization, a known time of the remote host must be supplied. Once
 * the remote time is known, this class can approximate the time on the remote
 * machine from a date or duration.
 *
 * @example
 * ```
 * const knownRemoteTime = await getRemoteTime();
 * const clock = new SynchronizedClock(knownRemoteTime);
 *
 * const localDate = new Date();
 * const serverTime = clock.remoteTime(localDate);
 *
 * const remoteDate = await getRemoteTime();
 * const localTime = clock.localTime(remoteDate);
 *
 * const currentRemoteTime = clock.remoteNow();
 * ```
 */
export declare class SynchronizedClock {
    readonly knownRemoteTime: Date;
    readonly knownLocalTime: Date;
    constructor(knownRemoteTime: Date, knownLocalTime?: Date);
    /**
     * Computes an offset duration from when this clock was instantiated.
     */
    localOffset(): Milliseconds;
    /**
     * Approximates the local time from a timestamp originating from the remote
     * machine.
     *
     * @param remoteTime A remote timestamp.
     */
    localTime(remoteTime: Date): Date;
    /**
     * Approximates the local from an offset duration originating from the remote
     * machine's last known time.
     *
     * @param remoteDurationInMs A remote duration, in milliseconds.
     */
    localTime(remoteDurationInMs: Milliseconds): Date;
    /**
     * Approximates an offset duration on the remote machine.
     *
     * @param localTime A local timestamp. Defaults to the current local time.
     */
    remoteOffset(localTime?: Date): Milliseconds;
    /**
     * Approximates the current time on the remote machine.
     */
    remoteNow(): Date;
    /**
     * Approximates the remote time from a local timestamp.
     *
     * @param localTime A local timestamp.
     */
    remoteTime(localTime: Date): Date;
    /**
     * Approximates the remote time from a local offset duration.
     *
     * @param localDurationInMs A local offset, in milliseconds.
     * @see #localOffset
     */
    remoteTime(localDurationInMs: Milliseconds): Date;
    private addDuration;
    private duration;
    private localNow;
}
export {};
