1.7.2 • Published 4 months ago

ntpclient v1.7.2

Weekly downloads
199
License
GPL-3.0
Repository
-
Last release
4 months 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.4

6 months ago

1.7.2

4 months ago

1.7.1

4 months ago

1.7.0

4 months ago

1.6.5

4 months ago

1.6.3

8 months ago

1.6.2

12 months ago

1.6.1

12 months ago

1.6.0

12 months ago

1.5.10

12 months ago

1.5.9

12 months ago

1.5.8

12 months ago

1.5.7

12 months ago

1.5.5

1 year ago

1.5.4

1 year ago

1.5.3

1 year ago

1.5.2

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.5.6

1 year 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

6 years ago

1.0.0

6 years ago

0.8.0

6 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