Comparing version 0.0.1 to 0.0.2
11
bpc.js
@@ -135,4 +135,9 @@ /** | ||
} | ||
var stopFunction = null; | ||
var isRunning = false; | ||
function BPCStart(utctime, cb) { | ||
if (true === isRunning) { | ||
return stopFunction; | ||
} | ||
isRunning = true; | ||
if ('function' === typeof utctime) { | ||
@@ -185,3 +190,4 @@ cb = utctime; | ||
}, 1e3 - Date.now() % 1e3); | ||
return function () { | ||
stopFunction = function () { | ||
isRunning = false; | ||
clearInterval(intervalHandle); | ||
@@ -196,2 +202,3 @@ setTimeout(function() { | ||
}; | ||
return stopFunction; | ||
} | ||
@@ -198,0 +205,0 @@ if ('object' === typeof module) module.exports = BPCStart; |
{ | ||
"name": "bpc.js", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A JavaScript library used to generate 68.5KHz BPC which used for Radio controlled timepieces", | ||
@@ -5,0 +5,0 @@ "main": "bpc.js", |
Sorry, the diff of this file is not supported yet
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
10362
7
230
1
12