[sysprof] battery: poll batteries immediately after starting



commit 2ef74062e9fce05c950e94490d62c17235512e30
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jun 13 19:39:16 2019 -0700

    battery: poll batteries immediately after starting

 src/libsysprof/sysprof-battery-source.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/libsysprof/sysprof-battery-source.c b/src/libsysprof/sysprof-battery-source.c
index 92db482..b3934e2 100644
--- a/src/libsysprof/sysprof-battery-source.c
+++ b/src/libsysprof/sysprof-battery-source.c
@@ -240,6 +240,9 @@ sysprof_battery_source_start (SysprofSource *source)
   g_assert (SYSPROF_IS_BATTERY_SOURCE (self));
 
   self->poll_source = g_timeout_add_seconds (1, sysprof_battery_source_poll_cb, self);
+
+  /* Poll immediately */
+  sysprof_battery_source_poll_cb (self);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]