evisum/src/bin/evisum_watcher.c

41 lines
720 B
C
Raw Normal View History

2021-05-16 04:12:19 -07:00
#include <Eina.h>
#include <Ecore.h>
#include "next/machine.h"
static Ecore_Timer *background_timer;
2021-05-16 04:12:19 -07:00
static Eina_List *cores = NULL;
static Eina_List *batteries = NULL;
static Eina_List *sensors = NULL;
static Eina_List *network_interfaces = NULL;
2021-05-16 08:37:58 -07:00
static Eina_Bool
_cb_background_timer(void *data EINA_UNUSED)
2021-05-16 04:12:19 -07:00
{
static int64_t poll_count = 0;
static double t_prev = 0;
double t;
poll_count++;
t = ecore_loop_time_get();
2021-05-16 04:12:19 -07:00
if (t_prev) printf("%1.4f\n", t - t_prev);
t_prev = t;
2021-05-16 04:12:19 -07:00
return 1;
2021-05-16 04:12:19 -07:00
}
int
main(int argc, char **argv)
{
ecore_init();
background_timer = ecore_timer_add(0.025, _cb_background_timer, NULL);
2021-05-16 04:12:19 -07:00
ecore_main_loop_begin();
ecore_shutdown();
return 0;
}