fix: 对不支持weak的bsp, luat_http_client_onevent报重复定义了
[LuatOS.git] / luat / include / luat_timer.h
blob85d684499ce1ee83843fd3c27b6f7d7d771166d6
1 #ifndef LUAT_TIMER_H
2 #define LUAT_TIMER_H
4 #include "luat_base.h"
5 #ifdef __LUATOS__
6 #include "luat_msgbus.h"
7 #endif
9 typedef struct luat_timer
11 void* os_timer;
12 size_t id;
13 size_t timeout;
14 size_t type;
15 int repeat;
16 #ifdef __LUATOS__
17 luat_msg_handler func;
18 #endif
20 }luat_timer_t;
23 int luat_timer_start(luat_timer_t* timer);
24 int luat_timer_stop(luat_timer_t* timer);
25 luat_timer_t* luat_timer_get(size_t timer_id);
28 int luat_timer_mdelay(size_t ms);
30 #endif