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:
Niels De Graef
2018-06-26 23:15:39 +02:00
parent cbfa776fc1
commit 789af6acdc
4 changed files with 10 additions and 9 deletions

View File

@@ -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",