tests: Stop using deprecated g_get_current_time()

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1438
This commit is contained in:
Philip Withnall
2019-07-24 14:10:05 +01:00
parent 161654681f
commit de25be72f0
2 changed files with 8 additions and 10 deletions

View File

@@ -66,14 +66,14 @@ socket_client_event (GSocketClient *client,
GSocketConnection *connection)
{
static GEnumClass *event_class;
GTimeVal tv;
gint64 now_us;
if (!event_class)
event_class = g_type_class_ref (G_TYPE_SOCKET_CLIENT_EVENT);
g_get_current_time (&tv);
printf ("% 12ld.%06ld GSocketClient => %s [%s]\n",
tv.tv_sec, tv.tv_usec,
now_us = g_get_real_time ();
g_print ("%" G_GINT64_FORMAT " GSocketClient => %s [%s]\n",
now_us,
g_enum_get_value (event_class, event)->value_nick,
connection ? G_OBJECT_TYPE_NAME (connection) : "");
}