internet-time
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "internet-time", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -27,6 +27,5 @@ const io = require('socket.io-client') | ||
e.delta = () => clocksy.getDelta() | ||
let started = false | ||
let started = false | ||
e.now = () => { | ||
e.delta = () => { | ||
if (!started) { | ||
@@ -37,5 +36,16 @@ socket.open() | ||
started = true | ||
return clocksy.getDelta() | ||
} | ||
e.now = () => { | ||
return Date.now() + e.delta() | ||
} | ||
e.nextDelta = () => { | ||
return new Promise(resolve => { | ||
e.now() | ||
e.once('delta', resolve) | ||
}) | ||
} | ||
module.exports = e |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1154
39