offset.js 321B

1234567891011121314151617
  1. var Sntp = require('../lib');
  2. // Request offset once
  3. Sntp.offset(function (err, offset) {
  4. console.log(offset); // New (served fresh)
  5. // Request offset again
  6. Sntp.offset(function (err, offset) {
  7. console.log(offset); // Identical (served from cache)
  8. });
  9. });