diff options
author | Bastien Nocera <hadess@hadess.net> | 2014-09-24 15:15:23 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2014-09-24 15:16:11 +0200 |
commit | 5ddfe0dba19c069b16a1b38cac2fa9dc8372862d (patch) | |
tree | 1d806f20386cf172e86fef0140868e480b0333f5 /src/linux/up-device-supply.c | |
parent | 8271045a68b5d34a47d0c6214681e2b088234d2e (diff) | |
download | upower-5ddfe0dba19c069b16a1b38cac2fa9dc8372862d.tar.gz |
all: Use g_get_real_time() when possible
Instead of a call to g_get_current_time().
Diffstat (limited to 'src/linux/up-device-supply.c')
-rw-r--r-- | src/linux/up-device-supply.c | 7 |
1 files changed, 2 insertions, 5 deletions
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; } |