Display the time of the completed sequence when passed from main process.
This commit is contained in:
parent
7907ba9533
commit
f015a6f2c5
|
@ -18,7 +18,8 @@ class Sequence {
|
|||
ipcRenderer.on(this.id, this.listener.bind(this));
|
||||
}
|
||||
listener(event, 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);
|
||||
|
@ -44,6 +45,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;
|
||||
|
|
Loading…
Reference in New Issue