[totem/gbsneto/various-cleanups: 2/3] open-directory: Replace GTimeVal by g_get_current_time()




commit aaf0794b0e1494a4e7992d1e3572a3095eb315f9
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Feb 8 12:18:46 2022 -0300

    open-directory: Replace GTimeVal by g_get_current_time()
    
    GTimeVal is deprecated, and will be removed in a future version
    of GLib. Use the recommended g_get_current_time() function.

 src/plugins/open-directory/totem-open-directory.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/open-directory/totem-open-directory.c 
b/src/plugins/open-directory/totem-open-directory.c
index 0171ab3d6..27de08b09 100644
--- a/src/plugins/open-directory/totem-open-directory.c
+++ b/src/plugins/open-directory/totem-open-directory.c
@@ -41,10 +41,9 @@ TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_OPEN_DIRECTORY_PLUGIN, TotemOpenDirectoryPlugin
 static char *
 get_notification_id (void)
 {
-       GTimeVal time;
-
-       g_get_current_time (&time);
-       return g_strdup_printf ("%s_TIME%ld", "totem", time.tv_sec);
+       return g_strdup_printf ("%s_TIME%ld",
+                               "totem",
+                               g_get_real_time () / G_TIME_SPAN_SECOND);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]