[gnome-system-monitor] Fix displayed network transfer rates
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Fix displayed network transfer rates
- Date: Fri, 21 Feb 2020 07:07:15 +0000 (UTC)
commit c031de0a3469faf5020768de506c6169e1e71ac0
Author: Michael Hudson-Doyle <michael hudson canonical com>
Date: Fri Feb 21 20:02:31 2020 +1300
Fix displayed network transfer rates
g_get_monotonic_time works in microseconds...
src/load-graph.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/load-graph.cpp b/src/load-graph.cpp
index 96f63970..d5b0ebe9 100644
--- a/src/load-graph.cpp
+++ b/src/load-graph.cpp
@@ -646,7 +646,7 @@ get_net (LoadGraph *graph)
if (in >= graph->net.last_in && out >= graph->net.last_out && graph->net.time != 0) {
float dtime;
- dtime = time - graph->net.time;
+ dtime = (time - graph->net.time) / G_USEC_PER_SEC;
din = static_cast<guint64>((in - graph->net.last_in) / dtime);
dout = static_cast<guint64>((out - graph->net.last_out) / dtime);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]