1.7.2 • Published 3 months ago
ntpclient v1.7.2
NTPClient
TypeScript implementation of the NTP Client Protocol. Based on node-ntp-client.
Prerequisites
Installation
ℹ️ This is a hybrid CommonJS / ESM module.
Run yarn add ntpclient
or npm i ntpclient
.
import {NTPClient} from 'ntpclient';
new NTPClient()
.getNetworkTime()
.then(date => console.log(date)) // 2017-09-20T15:29:09.443Z
.catch(err => console.error(err));
// or
new NTPClient({
server: 'de.pool.ntp.org',
port: 123,
replyTimeout: 40 * 1000, // 40 seconds
})
.getNetworkTime()
.then(date => console.log(date)) // 2017-09-20T15:29:09.443Z
.catch(err => console.error(err));
// or
new NTPClient('de.pool.ntp.org', 123, 40 * 1000)
.getNetworkTime()
.then(date => console.log(date)) // 2017-09-20T15:29:09.443Z
.catch(err => console.error(err));
1.6.4
5 months ago
1.7.2
3 months ago
1.7.1
3 months ago
1.7.0
3 months ago
1.6.5
3 months ago
1.6.3
7 months ago
1.6.2
11 months ago
1.6.1
11 months ago
1.6.0
11 months ago
1.5.10
11 months ago
1.5.9
11 months ago
1.5.8
11 months ago
1.5.7
11 months ago
1.5.5
12 months ago
1.5.4
12 months ago
1.5.3
12 months ago
1.5.2
1 year ago
1.5.1
1 year ago
1.5.0
1 year ago
1.5.6
12 months ago
1.4.1
2 years ago
1.4.0
2 years ago
1.3.1
2 years ago
1.2.0
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.3.0
2 years ago
1.1.3
2 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.8.0
5 years ago
0.7.3
6 years ago
0.7.2
6 years ago
0.7.1
6 years ago
0.7.0
6 years ago
0.6.2
6 years ago
0.6.1
7 years ago
0.6.0
7 years ago
0.5.7
7 years ago
0.5.6
7 years ago
0.5.5
7 years ago
0.5.4
7 years ago
0.5.3
7 years ago