mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
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:
parent
db0c54c5c8
commit
d7a9b08268
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue