diff options
author | Benjamin Franzke <benjaminfranzke@gmail.com> | 2020-02-13 20:34:11 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@gmail.com> | 2020-02-13 20:34:23 +0100 |
commit | e73db5681823d69fa445e087f48f440df14e267b (patch) | |
tree | 50286d4b3cafb12bdbacd86496258528b31874c7 | |
parent | 261e27dea1f844a6e43cda489f4497cbd5dc480f (diff) | |
download | cmumble-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.c | 7 |
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; } |