#ifndef _TIMER_H_
#define _TIMER_H_

#ifdef __cplusplus
extern          "C" {
#endif

#include <time.h>
#include <sys/times.h> 
#include <signal.h>

#define MAX_TIMER_INDEX 128

struct timer_desc
{
	timer_t timerid;
	int     taskid;
	short   index;
};

timer_t create_timer (int task ,short index);
int delete_timer(timer_t timerid);
int set_timer(timer_t timerid,unsigned long oneshot,unsigned long periodic);
int clear_time(timer_t timerid);

#ifdef __cplusplus
}
#endif

#endif


