glib_compat.h: use monotonic_clock_us() in g_source_get_time()
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user