[totem/gbsneto/various-cleanups: 12/13] open-directory: Replace GTimeVal by g_get_monotonic_time()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gbsneto/various-cleanups: 12/13] open-directory: Replace GTimeVal by g_get_monotonic_time()
- Date: Wed, 9 Feb 2022 17:13:36 +0000 (UTC)
commit 7be70893490a561934bc848120adbffc5b4e4656
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_monotonic_time()
GTimeVal is deprecated, and will be removed in a future version
of GLib. Use g_get_monotonic_time() instead.
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..30ce8a14a 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_monotonic_time () / G_TIME_SPAN_SECOND);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]