mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
gnetworkmonitornetlink: Use a coarser-grained timer for dumps
By using g_timeout_source_new_seconds(), we can let timer wakeups be coalesced by the scheduler, and reduce power consumption a bit. This shouldn’t really affect the accuracy of the network monitoring. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=793880
This commit is contained in:
parent
85f3bc133f
commit
23fad11430
@ -206,7 +206,7 @@ queue_request_dump (GNetworkMonitorNetlink *nl)
|
||||
g_source_unref (nl->priv->dump_source);
|
||||
}
|
||||
|
||||
nl->priv->dump_source = g_timeout_source_new (1000);
|
||||
nl->priv->dump_source = g_timeout_source_new_seconds (1);
|
||||
g_source_set_callback (nl->priv->dump_source,
|
||||
(GSourceFunc) timeout_request_dump, nl, NULL);
|
||||
g_source_attach (nl->priv->dump_source, nl->priv->context);
|
||||
|
Loading…
Reference in New Issue
Block a user