From dea549d0ff959d93fa7d73db38fd404d6153d92f Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 26 Mar 2019 21:43:56 +0100 Subject: [PATCH] networkInterfaces() speed bug (windows) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 6 +++--- lib/network.js | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69f912d..32f48cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 4.1.4 | 2019-03-26 | `networkInterfaces()` speed bug (windows) | | 4.1.3 | 2019-03-24 | wmic path detection (windows) | | 4.1.2 | 2019-03-23 | updated docs | | 4.1.1 | 2019-03-13 | updated typescript typings | diff --git a/docs/history.html b/docs/history.html index 4618f5e..8f99885 100644 --- a/docs/history.html +++ b/docs/history.html @@ -80,6 +80,11 @@ + + 4.1.4 + 2019-03-26 + networkInterfaces() speed bug (windows) + 4.1.3 2019-03-24 diff --git a/docs/index.html b/docs/index.html index b4c096f..b0c4c81 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
-
Current Version: 4.1.3
+
Current Version: 4.1.4
@@ -193,7 +193,7 @@
-
8,215
+
8,219
Lines of code
@@ -201,7 +201,7 @@
Downloads last month
-
141
+
146
Dependends
diff --git a/lib/network.js b/lib/network.js index 7a23be3..799aa7d 100644 --- a/lib/network.js +++ b/lib/network.js @@ -163,7 +163,7 @@ function parseLinesWindowsNics(sections) { let lines = sections[i].trim().split('\r\n'); let netEnabled = util.getValue(lines, 'NetEnabled', '='); if (netEnabled) { - const speed = parseInt(util.getValue(lines, 'speed', '=').trim(), 10); + const speed = parseInt(util.getValue(lines, 'speed', '=').trim(), 10) / 1000000; nics.push({ mac: util.getValue(lines, 'MACAddress', '=').toLowerCase(), name: util.getValue(lines, 'Name', '=').replace(/\]/g, ')').replace(/\[/g, '('),