summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeemu Ikonen <tpikonen@mailbox.org>2021-10-20 20:22:14 +0300
committerTeemu Ikonen <tpikonen@mailbox.org>2021-10-21 14:59:12 +0300
commitfe7d32a49c1f7bf2b9fe47870850f18b02799841 (patch)
treed47b8a697f00aa37cf6b20cb87591c426d58f780
parent5222fccb867aececff13cad59d4afb2e99017296 (diff)
location: Don't use GTimeVal and g_get_current_time
They have been deprecated since GLib version 2.62.
-rw-r--r--src/gclue-location.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gclue-location.c b/src/gclue-location.c
index 266c293..dd14568 100644
--- a/src/gclue-location.c
+++ b/src/gclue-location.c
@@ -230,13 +230,13 @@ static void
gclue_location_constructed (GObject *object)
{
GClueLocation *location = GCLUE_LOCATION (object);
- GTimeVal tv;
+ gint64 timestamp;
if (location->priv->timestamp != 0)
return;
- g_get_current_time (&tv);
- gclue_location_set_timestamp (location, tv.tv_sec);
+ timestamp = g_get_real_time () / G_USEC_PER_SEC;
+ gclue_location_set_timestamp (location, timestamp);
}
static void