Comparing version 2.0.18 to 2.0.19
25
ckn.js
@@ -0,1 +1,2 @@ | ||
import { CKNTimer } from './ckn.timer.js'; | ||
Array.prototype.select = function(selectFunc) { | ||
@@ -345,26 +346,2 @@ let output = []; | ||
}; | ||
class CKNTimer { | ||
constructor(_intervalTime = 1000) { | ||
this.intervalTime = _intervalTime; | ||
this.#started = false; | ||
} | ||
#started = false; | ||
async start() { | ||
this.#started = true; | ||
this.#run(); | ||
} | ||
async stop() { | ||
this.#started = false; | ||
} | ||
async #run() { | ||
if (this.onProcess != null) this.onProcess(); | ||
if (this.#started) { | ||
setTimeout(() => { | ||
this.#run(); | ||
}, this.intervalTime); | ||
} | ||
} | ||
} | ||
export { ckn,CKNTimer }; |
{ | ||
"name": "ckn", | ||
"version": "2.0.18", | ||
"version": "2.0.19", | ||
"description": "CKN Framework", | ||
@@ -5,0 +5,0 @@ "main": "ckn.js", |
25827
7
723