12345678910111213141516 |
- #ifndef __SOFTWARE_TIMER_H__
- #define __SOFTWARE_TIMER_H__
- typedef struct
- {
- unsigned long second; //秒
- unsigned long usec; //微秒
- } sw_timer_t;
- extern unsigned long dwTickCount;
- void sw_timer_init(int clk);
- void sw_timer_now(sw_timer_t *timer);
- void sw_timer_start(sw_timer_t *timer,int sec,int usec);
- int sw_timer_expire(sw_timer_t *timer);
- void sw_timer_delay(sw_timer_t *timer,int sec, int usec);
- #endif
|