summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@gmail.com>2020-02-13 20:34:11 +0100
committerBenjamin Franzke <benjaminfranzke@gmail.com>2020-02-13 20:34:23 +0100
commite73db5681823d69fa445e087f48f440df14e267b (patch)
tree50286d4b3cafb12bdbacd86496258528b31874c7
parent261e27dea1f844a6e43cda489f4497cbd5dc480f (diff)
downloadcmumble-e73db5681823d69fa445e087f48f440df14e267b.tar.gz
cmumble-e73db5681823d69fa445e087f48f440df14e267b.tar.bz2
cmumble-e73db5681823d69fa445e087f48f440df14e267b.zip
Use GDateTime instead of the deprecated GTimeVal
You know, year 2038…
-rw-r--r--src/cmumble.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cmumble.c b/src/cmumble.c
index 6309390..a3bd568 100644
--- a/src/cmumble.c
+++ b/src/cmumble.c
@@ -298,16 +298,17 @@ static gboolean
do_ping(struct cmumble *cm)
{
mumble_ping_t ping;
- GTimeVal tv;
+ GDateTime* now = g_date_time_new_now_local();
cmumble_init_ping(&ping);
- g_get_current_time(&tv);
- ping.timestamp = tv.tv_sec;
+ ping.timestamp = g_date_time_to_unix(now);
ping.has_timestamp = 1;
ping.resync = 1;
ping.has_resync = 1;
cmumble_send_ping(cm, &ping);
+ g_date_time_unref(now);
+
return TRUE;
}