ecore - add run state evlogs to know when we run (mainloop) or sleep

This commit is contained in:
Carsten Haitzler 2016-11-10 14:16:30 +09:00
parent 819c14c86f
commit 2f6045abc0
2 changed files with 4 additions and 0 deletions

View File

@ -225,6 +225,7 @@ ecore_init(void)
#endif
if (!eina_init())
goto shutdown_evil;
eina_evlog(">RUN", NULL, 0.0, NULL);
_ecore_log_dom = eina_log_domain_register("ecore", ECORE_DEFAULT_LOG_COLOR);
if (_ecore_log_dom < 0)
{
@ -446,6 +447,7 @@ ecore_shutdown(void)
efl_object_shutdown();
eina_evlog("<RUN", NULL, 0.0, NULL);
eina_shutdown();
#ifdef HAVE_EVIL
evil_shutdown();

View File

@ -1772,10 +1772,12 @@ _ecore_main_select(double timeout)
}
if (_ecore_signal_count_get()) return -1;
eina_evlog("<RUN", NULL, 0.0, NULL);
eina_evlog("!SLEEP", NULL, 0.0, t ? "timeout" : "forever");
ret = main_loop_select(max_fd + 1, &rfds, &wfds, &exfds, t);
err_no = errno;
eina_evlog("!WAKE", NULL, 0.0, NULL);
eina_evlog(">RUN", NULL, 0.0, NULL);
_ecore_time_loop_time = ecore_time_get();
if (ret < 0)