#include <alarmd/alarm_event.h> ... cookie_t *list; list=alarm_event_query(time(NULL),time(NULL)+40,0,0); ...