systeminformation 5.17.1 → 5.17.3

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/lib/processes.js CHANGED
@@ -93,8 +93,15 @@ function parseElapsedTime(etime) {
93
93
  const secs = parseInt(timeStr[timeStr.length === 3 ? 2 : 1] || 0);
94
94
  const ms = (((((days * 24 + hours) * 60) + mins) * 60 + secs) * 1000);
95
95
 
96
- const res = new Date(current.getTime() - ms);
97
- return res.toISOString().substring(0, 10) + ' ' + res.toISOString().substring(11, 19);
96
+ let res = new Date(current.getTime());
97
+ let result = res.toISOString().substring(0, 10) + ' ' + res.toISOString().substring(11, 19);
98
+ try {
99
+ res = new Date(current.getTime() - ms);
100
+ result = res.toISOString().substring(0, 10) + ' ' + res.toISOString().substring(11, 19);
101
+ } catch {
102
+ util.noop();
103
+ }
104
+ return result;
98
105
  }
99
106
 
100
107
  // --------------------------
package/lib/util.js CHANGED
@@ -414,7 +414,7 @@ function powerShellRelease() {
414
414
  _psPersistent = false;
415
415
  }
416
416
  } catch (e) {
417
- _psChild.kill();
417
+ if (_psChild) { _psChild.kill(); }
418
418
  }
419
419
  _psChild = null;
420
420
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.17.1",
3
+ "version": "5.17.3",
4
4
  "description": "Advanced, lightweight system and OS information library",
5
5
  "license": "MIT",
6
6
  "author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",