UNPKG

850 BTypeScriptView Raw
1export interface Options {
2 host?: string | undefined;
3 port?: number | undefined;
4 resolveReference?: boolean | undefined;
5 timeout?: number | undefined;
6}
7
8export interface TimeOptions {
9 isValid: boolean;
10 leapIndicator: string;
11 version: number;
12 mode: string;
13 stratum: string;
14 pollInterval: number;
15 precision: number;
16 rootDelay: number;
17 rootDispersion: number;
18 referenceId: string;
19 referenceTimestamp: number;
20 originateTimestamp: number;
21 receiveTimestamp: number;
22 transmitTimestamp: number;
23 d: number;
24 t: number;
25 receivedLocally: number;
26}
27
28export function start(options?: Options): Promise<void>;
29
30export function stop(): void;
31
32export function offset(): Promise<number>;
33
34export function time(options?: Options): Promise<TimeOptions>;
35
36export function now(): number;