summaryrefslogtreecommitdiff
path: root/src/linux/up-device-unifying.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2014-09-24 15:15:23 +0200
committerBastien Nocera <hadess@hadess.net>2014-09-24 15:16:11 +0200
commit5ddfe0dba19c069b16a1b38cac2fa9dc8372862d (patch)
tree1d806f20386cf172e86fef0140868e480b0333f5 /src/linux/up-device-unifying.c
parent8271045a68b5d34a47d0c6214681e2b088234d2e (diff)
downloadupower-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-unifying.c')
-rw-r--r--src/linux/up-device-unifying.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/linux/up-device-unifying.c b/src/linux/up-device-unifying.c
index 7d0dbf9..2795831 100644
--- a/src/linux/up-device-unifying.c
+++ b/src/linux/up-device-unifying.c
@@ -48,7 +48,6 @@ up_device_unifying_refresh (UpDevice *device)
{
gboolean ret;
GError *error = NULL;
- GTimeVal timeval;
HidppRefreshFlags refresh_flags;
UpDeviceState state = UP_DEVICE_STATE_UNKNOWN;
UpDeviceUnifying *unifying = UP_DEVICE_UNIFYING (device);
@@ -95,7 +94,6 @@ up_device_unifying_refresh (UpDevice *device)
state = UP_DEVICE_STATE_UNKNOWN;
}
- g_get_current_time (&timeval);
lux = hidpp_device_get_luminosity (priv->hidpp_device);
if (lux >= 0) {
g_object_set (device, "luminosity", lux, NULL);
@@ -105,7 +103,7 @@ up_device_unifying_refresh (UpDevice *device)
"is-present", hidpp_device_is_reachable (priv->hidpp_device),
"percentage", (gdouble) hidpp_device_get_batt_percentage (priv->hidpp_device),
"state", state,
- "update-time", (guint64) timeval.tv_sec,
+ "update-time", (guint64) g_get_real_time (),
NULL);
out:
return TRUE;