[mutter] cogl: Remove get_monotonic_time_ns()



commit 5d8cb2786b096916ecd177abed0d63f997902c05
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Fri Oct 9 11:21:55 2020 +0300

    cogl: Remove get_monotonic_time_ns()
    
    It's no longer needed. Everything else uses and assumes
    g_get_monotonic_time().
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1484>

 cogl/cogl/winsys/cogl-onscreen-glx.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
---
diff --git a/cogl/cogl/winsys/cogl-onscreen-glx.c b/cogl/cogl/winsys/cogl-onscreen-glx.c
index 6526ae799f..65c8312c22 100644
--- a/cogl/cogl/winsys/cogl-onscreen-glx.c
+++ b/cogl/cogl/winsys/cogl-onscreen-glx.c
@@ -355,15 +355,6 @@ _cogl_winsys_wait_for_gpu (CoglOnscreen *onscreen)
   ctx->glFinish ();
 }
 
-static int64_t
-get_monotonic_time_ns (void)
-{
-  struct timespec ts;
-
-  clock_gettime (CLOCK_MONOTONIC, &ts);
-  return ts.tv_sec * G_GINT64_CONSTANT (1000000000) + ts.tv_nsec;
-}
-
 static void
 ensure_ust_type (CoglRenderer *renderer,
                  GLXDrawable   drawable)
@@ -403,7 +394,7 @@ ensure_ust_type (CoglRenderer *renderer,
 
   /* This is the time source that the newer (fixed) linux drm
    * drivers use (Linux >= 3.8) */
-  current_monotonic_time = get_monotonic_time_ns () / 1000;
+  current_monotonic_time = g_get_monotonic_time ();
 
   if (current_monotonic_time > ust - 1000000 &&
       current_monotonic_time < ust + 1000000)


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