mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-03 12:19:20 +02:00
Prefer g_get_real_time() over time(NULL)
Especially when casting the result to guint64, since this might not be always correct. See also issue #1402.
This commit is contained in:
@@ -79,7 +79,7 @@ on_name_appeared (GDBusConnection *connection,
|
||||
gssize len;
|
||||
gchar *str;
|
||||
|
||||
now = time (NULL);
|
||||
now = g_get_real_time ();
|
||||
strftime (now_buf,
|
||||
sizeof now_buf,
|
||||
"%Y-%m-%d %H:%M:%S",
|
||||
|
Reference in New Issue
Block a user