dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/sntp/examples/offset.js

17 lines
321 B
JavaScript
Raw Normal View History

2016-09-11 09:29:13 +01: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)
});
});