summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}