mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
tests: Stop using deprecated g_get_current_time()
Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1438
This commit is contained in:
@@ -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) : "");
|
||||
}
|
||||
|
Reference in New Issue
Block a user