From 418670ce3330221d3150c6efcec39128e941588a Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Tue, 28 May 2019 17:48:42 -0400 Subject: [PATCH] Time a sequence and pass back value of milliseconds back when sequence stops. --- app/lib/sequencer/index.js | 5 ++++- app/lib/sequencer/index.js.map | 2 +- app/src/lib/ui/seq.ts | 7 ++++++- cli/lib/sequencer/index.js | 5 ++++- cli/lib/sequencer/index.js.map | 2 +- lib/sequencer/index.js | 5 ++++- lib/sequencer/index.js.map | 2 +- src/sequencer/index.ts | 8 ++++++-- 8 files changed, 27 insertions(+), 9 deletions(-) diff --git a/app/lib/sequencer/index.js b/app/lib/sequencer/index.js index c4d038c..5c9495e 100644 --- a/app/lib/sequencer/index.js +++ b/app/lib/sequencer/index.js @@ -70,6 +70,8 @@ class Sequencer { } //new, replaces exec and init async start(arg) { + let startTime = +new Date(); + let ms; if (arg && arg.arr) { this.arr = arg.arr; //overwrite sequence } @@ -116,9 +118,10 @@ class Sequencer { this.log.info(`Ended loop ${x + 1}`); this.ui.send(this.id, { loop: x, stop: true }); } + ms = (+new Date()) - startTime; //end sequence this.log.info(`Ended sequence`); - this.ui.send(this.id, { stop: true }); + this.ui.send(this.id, { stop: true, ms }); } //new pause() { diff --git a/app/lib/sequencer/index.js.map b/app/lib/sequencer/index.js.map index 24142ac..7426586 100644 --- a/app/lib/sequencer/index.js.map +++ b/app/lib/sequencer/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sequencer/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,2BAA4B;AAE5B,IAAI,GAAe,CAAC;AAEpB,MAAM,SAAS;IAmBd,YAAa,GAAS,EAAE,GAAS,EAAE,EAAQ;QAjBnC,YAAO,GAAa,KAAK,CAAC;QAC1B,WAAM,GAAa,KAAK,CAAC;QAEzB,SAAI,GAAW,EAAE,CAAC;QAClB,cAAS,GAAY,CAAC,CAAC;QAEvB,QAAG,GAAW,EAAE,CAAC,CA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AI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC7C,MAAM,GAAG,GAAY,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,WAAW,QAAQ,GAAG,EAAE,CAAC,CAAC;QACjD,kDAAkD;QAClD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;IAC9B,CAAC;CACD;AAED,MAAM,CAAC,OAAO,GAAG,UAAU,GAAS,EAAE,GAAS,EAAE,EAAQ;IACxD,OAAO,IAAI,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC,CAAA"} \ No newline at end of file diff --git a/app/src/lib/ui/seq.ts b/app/src/lib/ui/seq.ts index 20a11cb..e5614ab 100644 --- a/app/src/lib/ui/seq.ts +++ b/app/src/lib/ui/seq.ts @@ -18,6 +18,7 @@ interface Arg { step : number; stop : boolean; start : boolean; + ms : number; } interface Step { @@ -48,7 +49,8 @@ class Sequence { ipcRenderer.on(this.id, this.listener.bind(this)) } private listener (event : Event, arg : Arg) { - //console.log(JSON.stringify(arg)) + let timeStr; + console.log(JSON.stringify(arg)) if (arg.start) { if (typeof arg.loop !== 'undefined' && typeof arg.step !== 'undefined') { this.activeStep(arg.step); @@ -69,6 +71,9 @@ class Sequence { gui.overlay(false); gui.spinner(false); log.info('Sequence stopped', 'SERIAL', true); + log.info(typeof arg.ms) + timeStr = ( arg.ms < 2000 ) ? `${arg.ms}ms` : humanizeDuration(arg.ms); + gui.notify(`SEQUENCE`, `Sequence finished in ${timeStr}`); } } return event.returnValue = true; diff --git a/cli/lib/sequencer/index.js b/cli/lib/sequencer/index.js index c4d038c..5c9495e 100644 --- a/cli/lib/sequencer/index.js +++ b/cli/lib/sequencer/index.js @@ -70,6 +70,8 @@ class Sequencer { } //new, replaces exec and init async start(arg) { + let startTime = +new Date(); + let ms; if (arg && arg.arr) { this.arr = arg.arr; //overwrite sequence } @@ -116,9 +118,10 @@ class Sequencer { this.log.info(`Ended loop ${x + 1}`); this.ui.send(this.id, { loop: x, stop: true }); } + ms = (+new Date()) - startTime; //end sequence this.log.info(`Ended sequence`); - this.ui.send(this.id, { stop: true }); + this.ui.send(this.id, { stop: true, ms }); } //new pause() { diff --git a/cli/lib/sequencer/index.js.map b/cli/lib/sequencer/index.js.map index 24142ac..7426586 100644 --- a/cli/lib/sequencer/index.js.map +++ b/cli/lib/sequencer/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sequencer/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,2BAA4B;AAE5B,IAAI,GAAe,CAAC;AAEpB,MAAM,SAAS;IAmBd,YAAa,GAAS,EAAE,GAAS,EAAE,EAAQ;QAjBnC,YAAO,GAAa,KAAK,CAAC;QAC1B,WAAM,GAAa,KAAK,CAAC;QAEzB,SAAI,GAAW,EAAE,CAAC;QAClB,cAAS,GAAY,CAAC,CAAC;QAEvB,QAAG,GAAW,EAAE,CAAC,CAAC,yBAAyB;QAC3C,UAAK,GAAY,CAAC,CAAC;QAInB,SAAI,GAAS,EAAE,CAAC;QAIhB,OAAE,GAAY,UAAU,CAAC;QAGhC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IAEO,IAAI,CAAE,GAAS;QACtB,IAAI,IAAI,GAAc,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,KAAK,IAAI,GAAG,IAAI,IAAI,EAAE;YACrB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAA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.js +++ b/lib/sequencer/index.js @@ -70,6 +70,8 @@ class Sequencer { } //new, replaces exec and init async start(arg) { + let startTime = +new Date(); + let ms; if (arg && arg.arr) { this.arr = arg.arr; //overwrite sequence } @@ -116,9 +118,10 @@ class Sequencer { this.log.info(`Ended loop ${x + 1}`); this.ui.send(this.id, { loop: x, stop: true }); } + ms = (+new Date()) - startTime; //end sequence this.log.info(`Ended sequence`); - this.ui.send(this.id, { stop: true }); + this.ui.send(this.id, { stop: true, ms }); } //new pause() { diff --git a/lib/sequencer/index.js.map b/lib/sequencer/index.js.map index 24142ac..7426586 100644 --- a/lib/sequencer/index.js.map +++ b/lib/sequencer/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sequencer/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,2BAA4B;AAE5B,IAAI,GAAe,CAAC;AAEpB,MAAM,SAAS;IAmBd,YAAa,GAAS,EAAE,GAAS,EAAE,EAAQ;QAjBnC,YAAO,GAAa,KAAK,CAAC;QAC1B,WAAM,GAAa,KAAK,CAAC;QAEzB,SAAI,GAAW,EAAE,CAAC;QAClB,cAAS,GAAY,CAAC,CAAC;QAEvB,QAAG,GAAW,EAAE,CAAC,CAAC,yBAAyB;QAC3C,UAAK,GAAY,CAAC,CAAC;QAInB,SAAI,GAAS,EAAE,CAAC;QAIhB,OAAE,GAAY,UAAU,CAAC;QAGhC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC;IAEO,IAAI,CAAE,GAAS;QACtB,IAAI,IAAI,GAAc,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,KAAK,IAAI,GAAG,IAAI,IA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A"} \ No newline at end of file diff --git a/src/sequencer/index.ts b/src/sequencer/index.ts index 5662249..d40a40b 100644 --- a/src/sequencer/index.ts +++ b/src/sequencer/index.ts @@ -6,7 +6,6 @@ import Log = require('log'); let seq : Sequencer; class Sequencer { - private time : number; private running : boolean = false; private paused : boolean = false; @@ -86,6 +85,9 @@ class Sequencer { //new, replaces exec and init public async start (arg : any) { + let startTime : number = +new Date(); + let ms : number; + if (arg && arg.arr) { this.arr = arg.arr; //overwrite sequence } else { @@ -140,9 +142,11 @@ class Sequencer { this.log.info(`Ended loop ${x + 1}`) this.ui.send(this.id, { loop : x, stop : true }); } + + ms = ( +new Date() ) - startTime; //end sequence this.log.info(`Ended sequence`) - this.ui.send(this.id, { stop : true }) + this.ui.send(this.id, { stop : true, ms }) } //new