From e73db5681823d69fa445e087f48f440df14e267b Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 13 Feb 2020 20:34:11 +0100 Subject: Use GDateTime instead of the deprecated GTimeVal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit You know, year 2038… --- src/cmumble.c | 7 ++++--- 1 file 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; } -- cgit