Commit cbd0709d authored by Max Kellermann's avatar Max Kellermann

glib_compat.h: use monotonic_clock_us() in g_source_get_time()

parent 371d635d
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
#if !GLIB_CHECK_VERSION(2,28,0) #if !GLIB_CHECK_VERSION(2,28,0)
#include "system/clock.h"
static inline gint64 static inline gint64
g_source_get_time(GSource *source) g_source_get_time(GSource *source)
{ {
GTimeVal tv; return monotonic_clock_us();
g_source_get_current_time(source, &tv);
return tv.tv_sec * 1000000 + tv.tv_usec;
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment