From 5ddfe0dba19c069b16a1b38cac2fa9dc8372862d Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 24 Sep 2014 15:15:23 +0200 Subject: all: Use g_get_real_time() when possible Instead of a call to g_get_current_time(). --- src/linux/up-device-supply.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/linux/up-device-supply.c') diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index e94eefd..075235c 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -1088,7 +1088,6 @@ static gboolean up_device_supply_refresh (UpDevice *device) { gboolean ret; - GTimeVal timeval; UpDeviceSupply *supply = UP_DEVICE_SUPPLY (device); UpDeviceKind type; UpDeviceState state; @@ -1109,10 +1108,8 @@ up_device_supply_refresh (UpDevice *device) } /* reset time if we got new data */ - if (ret) { - g_get_current_time (&timeval); - g_object_set (device, "update-time", (guint64) timeval.tv_sec, NULL); - } + if (ret) + g_object_set (device, "update-time", (guint64) g_get_real_time (), NULL); return ret; } -- cgit v1.2.1