#ifndef __SOFTWARE_TIMER_H__ #define __SOFTWARE_TIMER_H__ typedef struct { int second; //秒 int 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