Files
ReLibreHardwareMonitor/Hardware/Nic
Nick Babcock 963dd27247 Rework NIC / Network Reporting (#75)
* Rework NIC / Network Reporting

* Switch to monotonic timer for calculating time deltas between reports. Relying on `DateTime` to calculate time deltas is dangerous as it would be susceptible to phenomena such as a user changing their time or leap seconds. The Stopwatch class allows us to get a monotonic timer if it exists.
* Interface statistics reset on wake. Previously this would cause nonsensical negative values to be reported. The fix is to reset the internal state when the interface statistics have been reset.
* Previously, interface hardware already seen when scanned would be re-registered causing zeros to be reported, so the fix is to keep track of what NICs have already been registered
* Corollary, old interfaces were not closed when removed.
* Document the code and constants used (eg: "800" is not indicative of converting bytes to bits and a ratio to a percentage). Hopefully it is much clearer.

Thanks to @nickbabcock
2019-01-13 12:40:03 +01:00
..
2019-01-13 12:40:03 +01:00