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
|
||||
#include "Ecore_Eo.h"
|
||||
|
||||
EAPI double _ecore_main_loop_wakeup_time_get(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -207,12 +207,20 @@ static gboolean _ecore_glib_idle_enterer_called;
|
|||
static gboolean ecore_fds_ready;
|
||||
#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
|
||||
_update_loop_time(Efl_Loop_Data *pd)
|
||||
{
|
||||
double loop_time = ecore_time_get();
|
||||
if (loop_time > pd->loop_time)
|
||||
pd->loop_time = loop_time;
|
||||
_ecore_main_loop_wakeup_time = loop_time;
|
||||
}
|
||||
|
||||
#ifdef EFL_EXTRA_SANITY_CHECKS
|
||||
|
|
Loading…
Reference in New Issue