diff options
Diffstat (limited to 'savers/floaters.c')
-rw-r--r-- | savers/floaters.c | 11 |
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 |