sntp / 2.0.1 last updated 2 days ago created on Jan 21st 2013
Install
npm install --save sntp
Clone
git clone git@github.com:hueniverse/sntp.git
dependencies
| main |
|
hoek | 4.0.2 | BSD 3-Clause |
maintainers
versions
24 total
| 2.0.1 | 2 days ago | hueniverse |
| 2.0.0 | 9 months ago | hueniverse |
| 1.0.9 | 2 years ago | hueniverse |
| 1.0.8 | 2 years ago | hueniverse |
| 1.0.7 | 2 years ago | hueniverse |
| 1.0.6 | 2 years ago | hueniverse |
| 1.0.5 | 2 years ago | hueniverse |
| 1.0.4 | 2 years ago | hueniverse |
| 1.0.3 | 2 years ago | hueniverse |
| 1.0.2 | 3 years ago | hueniverse |
| 1.0.1 | 3 years ago | hueniverse |
| 1.0.0 | 3 years ago | hueniverse |
| 0.2.4 | 3 years ago | hueniverse |
| 0.2.3 | 3 years ago | hueniverse |
| 0.2.2 | 3 years ago | hueniverse |
| 0.2.1 | 3 years ago | hueniverse |
| 0.2.0 | 3 years ago | hueniverse |
| 0.1.4 | 3 years ago | hueniverse |
| 0.1.3 | 3 years ago | hueniverse |
| 0.1.2 | 3 years ago | hueniverse |
| 0.1.1 | 4 years ago | hueniverse |
| 0.1.0 | 4 years ago | hueniverse |
| 0.0.1 | 4 years ago | hueniverse |
| 0.0.0 | 4 years ago | hueniverse |
readme
sntp
An SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time
along with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned t offset
to the local time.
Usage
If an application needs to maintain continuous time synchronization, the module provides a stateful method for querying the current offset only when the last one is too old (defaults to daily).
To set a background offset refresh, start the interval and use the provided now() method. If for any reason the client fails to obtain an up-to-date offset, the current system clock is used.
