@ejfdelgado/ejflab-common 1.10.5 → 1.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ejfdelgado/ejflab-common",
3
3
  "type": "commonjs",
4
- "version": "1.10.5",
4
+ "version": "1.10.6",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ejfdelgado/ejflab-common.git"
@@ -13,6 +13,8 @@ const { StepCheckSrc } = require("./steps/StepCheckSrc");
13
13
 
14
14
  const { CommandInc } = require("./steps/CommandInc");
15
15
  const { CommandSet } = require("./steps/CommandSet");
16
+ const { CommandTic } = require("./steps/CommandTic");
17
+ const { CommandToc } = require("./steps/CommandToc");
16
18
  const { StepReadSrc } = require('./steps/StepReadSrc');
17
19
  const { StepTimeLineEnds } = require('./steps/StepTimeLineEnds');
18
20
  const { StepTimeLineHasMore } = require('./steps/StepTimeLineHasMore');
@@ -67,6 +69,8 @@ class FlowChartExec {
67
69
  // Nodes
68
70
  this.registry["inc"] = CommandInc;
69
71
  this.registry["set"] = CommandSet;
72
+ this.registry["tic"] = CommandTic;
73
+ this.registry["toc"] = CommandToc;
70
74
  this.registry["timeline"] = CommandTimeline;
71
75
  this.registry["timelineNext"] = CommandTimelineNext;
72
76
  this.registry["milvus"] = CommandMilvus;
@@ -1,4 +1,3 @@
1
- const { SimpleObj } = require("../../SimpleObj");
2
1
  const { CommandBasic } = require("./CommandBasic");
3
2
 
4
3
  class CommandSet extends CommandBasic {
@@ -0,0 +1,13 @@
1
+ const { CommandBasic } = require("./CommandBasic");
2
+
3
+ class CommandTic extends CommandBasic {
4
+ async computation() {
5
+ const path = this.args[0];
6
+ const val = new Date().getTime();
7
+ this.writeArgument(`${path}.tic`, val);
8
+ }
9
+ }
10
+
11
+ module.exports = {
12
+ CommandTic
13
+ };
@@ -0,0 +1,17 @@
1
+ const { CommandBasic } = require("./CommandBasic");
2
+
3
+ class CommandToc extends CommandBasic {
4
+ async computation() {
5
+ const path = this.args[0];
6
+ const val = new Date().getTime();
7
+ const tic = this.resolveArgument(`${path}.tic`);
8
+ this.writeArgument(`${path}.toc`, val);
9
+ if (typeof tic == "number") {
10
+ this.writeArgument(`${path}.gap`, val - tic);
11
+ }
12
+ }
13
+ }
14
+
15
+ module.exports = {
16
+ CommandToc
17
+ };