1.6.3 • Published 7 days ago

ntpclient v1.6.3

Weekly downloads
199
License
GPL-3.0
Repository
github
Last release
7 days ago

NTPClient License: GPL v3 npm version

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.3

7 days ago

1.6.2

4 months ago

1.6.1

4 months ago

1.6.0

4 months ago

1.5.10

4 months ago

1.5.9

4 months ago

1.5.8

4 months ago

1.5.7

4 months ago

1.5.5

5 months ago

1.5.4

5 months ago

1.5.3

5 months ago

1.5.2

6 months ago

1.5.1

6 months ago

1.5.0

6 months ago

1.5.6

5 months ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.2.0

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.3.0

1 year ago

1.1.3

1 year ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 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

5 years ago

0.7.2

5 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 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