W72crm_web-master/node_modules/sntp/examples/offset.js

17 lines
321 B
JavaScript
Raw Permalink Normal View History

2025-05-27 11:25:53 +08:00
var Sntp = require('../lib');
// Request offset once
Sntp.offset(function (err, offset) {
console.log(offset); // New (served fresh)
// Request offset again
Sntp.offset(function (err, offset) {
console.log(offset); // Identical (served from cache)
});
});