1234567891011121314151617181920212223242526272829303132333435363738 |
- typedef uint32_t time_t;
- #define TIME_MHZ STK_MHZ
- #define time_us(x) stk_us(x)
- #define time_ms(x) stk_ms(x)
- #define time_stk(x) (x)
- #define time_sysclk(x) stk_sysclk(x)
- #define sysclk_time(x) sysclk_stk(x)
- time_t time_now(void);
- #define time_diff(x,y) ((int32_t)((y)-(x)))
- #define time_add(x,d) ((time_t)((x)+(d)))
- #define time_sub(x,d) ((time_t)((x)-(d)))
- #define time_since(x) time_diff(x, time_now())
- void time_init(void);
|