forked from enlightenment/efl
ecore - expose "hidden" internal api for debugging to get wakeup time
get the real time at which main loop woke up for purposes of debugging and finding jank/scheduling jitter.
This commit is contained in:
parent
375a060a07
commit
6096779ede
|
@ -331,6 +331,8 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#include "Ecore_Eo.h"
|
#include "Ecore_Eo.h"
|
||||||
|
|
||||||
|
EAPI double _ecore_main_loop_wakeup_time_get(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -207,12 +207,20 @@ static gboolean _ecore_glib_idle_enterer_called;
|
||||||
static gboolean ecore_fds_ready;
|
static gboolean ecore_fds_ready;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static double _ecore_main_loop_wakeup_time = 0.0;
|
||||||
|
|
||||||
|
EAPI double _ecore_main_loop_wakeup_time_get(void)
|
||||||
|
{
|
||||||
|
return _ecore_main_loop_wakeup_time;
|
||||||
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
_update_loop_time(Efl_Loop_Data *pd)
|
_update_loop_time(Efl_Loop_Data *pd)
|
||||||
{
|
{
|
||||||
double loop_time = ecore_time_get();
|
double loop_time = ecore_time_get();
|
||||||
if (loop_time > pd->loop_time)
|
if (loop_time > pd->loop_time)
|
||||||
pd->loop_time = loop_time;
|
pd->loop_time = loop_time;
|
||||||
|
_ecore_main_loop_wakeup_time = loop_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EFL_EXTRA_SANITY_CHECKS
|
#ifdef EFL_EXTRA_SANITY_CHECKS
|
||||||
|
|
Loading…
Reference in New Issue