@abaplint/runtime 1.7.38 → 1.7.42

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.
@@ -1,3 +1,2 @@
1
- import { ICharacter } from "../types/_character";
2
1
  import { INumeric } from "../types/_numeric";
3
- export declare function getRunTime(value: ICharacter | INumeric): void;
2
+ export declare function getRunTime(value: INumeric): void;
@@ -1,9 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRunTime = void 0;
4
+ let prev = undefined;
4
5
  function getRunTime(value) {
5
- // todo
6
- value.clear();
6
+ if (prev === undefined) {
7
+ value.set(0);
8
+ prev = new Date().getTime();
9
+ }
10
+ else {
11
+ const now = new Date().getTime();
12
+ value.set(now - prev);
13
+ prev = now;
14
+ }
7
15
  }
8
16
  exports.getRunTime = getRunTime;
9
17
  //# sourceMappingURL=get_run_time.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "1.7.38",
3
+ "version": "1.7.42",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",