worker-timers
Advanced tools
Comparing version 0.1.8 to 0.2.0
@@ -42,3 +42,4 @@ 'use strict'; | ||
// 'FirefoxDeveloperSauceLabs', | ||
'FirefoxSauceLabs' | ||
'FirefoxSauceLabs', | ||
'SafariSauceLabs' | ||
]; | ||
@@ -70,2 +71,7 @@ | ||
platform: 'OS X 10.11' | ||
}, | ||
SafariSauceLabs: { | ||
base: 'SauceLabs', | ||
browserName: 'safari', | ||
platform: 'OS X 10.11' | ||
} | ||
@@ -80,3 +86,4 @@ }; | ||
'Firefox', | ||
'FirefoxDeveloper' | ||
'FirefoxDeveloper', | ||
'Safari' | ||
]; | ||
@@ -83,0 +90,0 @@ } |
@@ -16,13 +16,14 @@ { | ||
"eslint-config-holy-grail": "^2.2.0", | ||
"grunt": "^0.4.5", | ||
"grunt-cli": "^0.1.13", | ||
"grunt-githooks": "^0.5.0", | ||
"grunt-karma": "^0.12.1", | ||
"grunt": "^1.0.1", | ||
"grunt-cli": "^1.0.0", | ||
"grunt-githooks": "^0.6.0", | ||
"grunt-karma": "^1.0.0", | ||
"gruntify-eslint": "^2.0.0", | ||
"karma": "^0.13.21", | ||
"karma-browserify": "^5.0.2", | ||
"karma-chrome-launcher": "^0.2.1", | ||
"karma-firefox-launcher": "^0.1.7", | ||
"karma-mocha": "^0.2.2", | ||
"karma-sauce-launcher": "^0.3.0", | ||
"karma-chrome-launcher": "^1.0.1", | ||
"karma-firefox-launcher": "^1.0.0", | ||
"karma-mocha": "^1.0.1", | ||
"karma-safari-launcher": "^1.0.0", | ||
"karma-sauce-launcher": "^1.0.0", | ||
"karma-sinon-chai": "^1.2.0", | ||
@@ -56,3 +57,3 @@ "load-grunt-config": "^0.19.0", | ||
}, | ||
"version": "0.1.8" | ||
"version": "0.2.0" | ||
} |
@@ -11,3 +11,3 @@ 'use strict'; | ||
function setTimeoutCallback (identifiers, id, expected, data) { | ||
var now = performance.now(); // eslint-disable-line no-undef | ||
var now = ('performance' in self) ? performance.now() : Date.now(); // eslint-disable-line no-undef | ||
@@ -54,8 +54,9 @@ if (now > expected) { | ||
} else { // action === 'set' | ||
delay = data.delay; | ||
now = performance.now(); // eslint-disable-line no-undef | ||
elapsed = now - data.now; | ||
if (elapsed > 0) { | ||
delay -= elapsed; | ||
if ('performance' in self) { // eslint-disable-line no-undef | ||
now = performance.now(); // eslint-disable-line no-undef | ||
elapsed = Math.max(0, now - data.now); | ||
delay = data.delay - elapsed; | ||
} else { | ||
now = Date.now(); | ||
delay = data.delay; | ||
} | ||
@@ -62,0 +63,0 @@ |
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
16664
425
22