1 | # Installation
|
2 | > `npm install --save @types/sntp`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for sntp (https://github.com/hueniverse/sntp).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sntp.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sntp/index.d.ts)
|
10 | ````ts
|
11 | // Type definitions for sntp 3.0
|
12 | // Project: https://github.com/hueniverse/sntp
|
13 | // Definitions by: Adam Zerella <https://github.com/adamzerella>
|
14 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
15 |
|
16 | export interface Options {
|
17 | host?: string | undefined;
|
18 | port?: number | undefined;
|
19 | resolveReference?: boolean | undefined;
|
20 | timeout?: number | undefined;
|
21 | }
|
22 |
|
23 | export interface TimeOptions {
|
24 | isValid: boolean;
|
25 | leapIndicator: string;
|
26 | version: number;
|
27 | mode: string;
|
28 | stratum: string;
|
29 | pollInterval: number;
|
30 | precision: number;
|
31 | rootDelay: number;
|
32 | rootDispersion: number;
|
33 | referenceId: string;
|
34 | referenceTimestamp: number;
|
35 | originateTimestamp: number;
|
36 | receiveTimestamp: number;
|
37 | transmitTimestamp: number;
|
38 | d: number;
|
39 | t: number;
|
40 | receivedLocally: number;
|
41 | }
|
42 |
|
43 | export function start(options?: Options): Promise<void>;
|
44 |
|
45 | export function stop(): void;
|
46 |
|
47 | export function offset(): Promise<number>;
|
48 |
|
49 | export function time(options?: Options): Promise<TimeOptions>;
|
50 |
|
51 | export function now(): number;
|
52 |
|
53 | ````
|
54 |
|
55 | ### Additional Details
|
56 | * Last updated: Tue, 06 Jul 2021 16:35:02 GMT
|
57 | * Dependencies: none
|
58 | * Global values: none
|
59 |
|
60 | # Credits
|
61 | These definitions were written by [ Adam Zerella](https://github.com/adamzerella).
|
62 |
|
\ | No newline at end of file |