systeminformation 5.17.2 → 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.
Files changed (2) hide show
  1. package/lib/processes.js +9 -2
  2. package/package.json +1 -1
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.17.2",
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)",