From d7a9b08268f05b6a4f195f8ebce2d58e952ca8d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 11 Jan 2018 18:44:50 +0000 Subject: [PATCH] utils: use g_get_monotonic_time() as fallback in gst_utils_get_timestamp() This is a better fit given that the function docs say this should (only) be used for interval measurements, but also this seems to give much better granularity on Windows systems, where before this change there would often be 10-20 lines of debug log with the same timestamp up front. --- gst/gstutils.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gst/gstutils.c b/gst/gstutils.c index 447fcf87db..7c1618abb4 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -3461,10 +3461,7 @@ gst_util_get_timestamp (void) clock_gettime (CLOCK_MONOTONIC, &now); return GST_TIMESPEC_TO_TIME (now); #else - GTimeVal now; - - g_get_current_time (&now); - return GST_TIMEVAL_TO_TIME (now); + return g_get_monotonic_time () * 1000; #endif }