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:
Carsten Haitzler 2020-05-21 17:58:46 +01:00
parent 375a060a07
commit 6096779ede
2 changed files with 10 additions and 0 deletions

View File

@ -331,6 +331,8 @@ extern "C" {
#endif
#include "Ecore_Eo.h"
EAPI double _ecore_main_loop_wakeup_time_get(void);
#ifdef __cplusplus
}
#endif

View File

@ -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