summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js')
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js
new file mode 100755
index 0000000000..0303f6dcfa
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js
@@ -0,0 +1,16 @@
+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)
+ });
+});
+