[mutter] clutter/stage-cogl: Use G_USEC_PER_SEC instead of hardcoded number



commit 912a9ecfba5224966d13cd4761d759586b72784f
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Tue Apr 2 17:03:11 2019 +0800

    clutter/stage-cogl: Use G_USEC_PER_SEC instead of hardcoded number
    
    One million is the number of microseconds in one second, which is also
    defined by `G_USEC_PER_SEC`.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/363

 clutter/clutter/cogl/clutter-stage-cogl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index e8ea80d7f..469645f04 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -201,7 +201,7 @@ clutter_stage_cogl_schedule_update (ClutterStageWindow *stage_window,
   if (refresh_rate == 0.0)
     refresh_rate = 60.0;
 
-  refresh_interval = (gint64) (0.5 + 1000000 / refresh_rate);
+  refresh_interval = (gint64) (0.5 + G_USEC_PER_SEC / refresh_rate);
   if (refresh_interval == 0)
     refresh_interval = 16667; /* 1/60th second */
 


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