summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-11-29 12:38:54 +0100
committerraveit65 <[email protected]>2022-02-19 01:32:43 +0100
commite01250a082dda7c715a14c36727a30d5dfd9a2b3 (patch)
treeba68da5417f5d64ea28a96b1040359f753838cf8
parent951fda145f4ac52c4abea497b7a9adfd869da676 (diff)
downloadmate-screensaver-e01250a082dda7c715a14c36727a30d5dfd9a2b3.tar.bz2
mate-screensaver-e01250a082dda7c715a14c36727a30d5dfd9a2b3.tar.xz
floaters: GTimeVal deprecation
-rw-r--r--savers/floaters.c11
1 files 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