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.
This commit is contained in:
Tim-Philipp Müller 2018-01-11 18:44:50 +00:00
parent db0c54c5c8
commit d7a9b08268

View file

@ -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
}