From e01250a082dda7c715a14c36727a30d5dfd9a2b3 Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 29 Nov 2021 12:38:54 +0100 Subject: floaters: GTimeVal deprecation --- savers/floaters.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/savers/floaters.c b/savers/floaters.c index 369a038..63d16f1 100644 --- a/savers/floaters.c +++ b/savers/floaters.c @@ -869,15 +869,8 @@ screen_saver_free (ScreenSaver *screen_saver) static gdouble screen_saver_get_timestamp (ScreenSaver *screen_saver) { - const gdouble microseconds_per_second = (gdouble ) G_USEC_PER_SEC; - gdouble timestamp; - GTimeVal now = { 0L, /* zero-filled */ }; - - g_get_current_time (&now); - timestamp = ((microseconds_per_second * now.tv_sec) + now.tv_usec) / - microseconds_per_second; - - return timestamp; + gint64 now = g_get_real_time (); + return (gdouble) now / (gdouble) G_USEC_PER_SEC; } static void -- cgit v1.2.1