#include "m2m_type.h"
#include "m2m_timer_api.h"
void user_timeout_handler(void *arg)
{
/* do something */
/* implement 1 second periodic timer functionality */
m2m_timer_start(user_timer, 1000);
return;
}
void timer_example(void)
{
M2M_T_TIMER_HANDLE user_timer = m2m_timer_create(user_timeout_handler, NULL);
m2m_timer_start(user_timer, 1000); /* start the timer with 1 sec timeout */
}