glib_compat.h: use monotonic_clock_us() in g_source_get_time()
This commit is contained in:
parent
371d635da8
commit
cbd0709d1c
|
@ -30,12 +30,12 @@
|
|||
|
||||
#if !GLIB_CHECK_VERSION(2,28,0)
|
||||
|
||||
#include "system/clock.h"
|
||||
|
||||
static inline gint64
|
||||
g_source_get_time(GSource *source)
|
||||
{
|
||||
GTimeVal tv;
|
||||
g_source_get_current_time(source, &tv);
|
||||
return tv.tv_sec * 1000000 + tv.tv_usec;
|
||||
return monotonic_clock_us();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue