include/timers_xeno/timerscfg.h
changeset 807 46027bb24429
parent 798 6bafede3de2b
equal deleted inserted replaced
806:b9f1fcda7d30 807:46027bb24429
    21 */
    21 */
    22 
    22 
    23 #ifndef __TIMERSCFG_H__
    23 #ifndef __TIMERSCFG_H__
    24 #define __TIMERSCFG_H__
    24 #define __TIMERSCFG_H__
    25 
    25 
    26 #include <alchemy/task.h>
    26 #include <pthread.h>
    27 #include <alchemy/timer.h>
       
    28 #include <alchemy/mutex.h>
       
    29 #include <alchemy/cond.h>
       
    30 #include <alchemy/sem.h>
       
    31 #include <alchemy/alarm.h>
       
    32 
    27 
    33 // Time unit : ns
    28 // Time unit : ns
    34 // Time resolution : 64bit (~584 years)
    29 // Time resolution : 64bit (~584 years)
    35 #define TIMEVAL RTIME
    30 #define TIMEVAL unsigned long long
    36 #define TIMEVAL_MAX ~(RTIME)0
    31 #define TIMEVAL_MAX ~(TIMEVAL)0
    37 #define MS_TO_TIMEVAL(ms)  rt_timer_ns2ticks((RTIME)ms*1000000)
    32 #define MS_TO_TIMEVAL(ms) ms*1000000LL
    38 #define US_TO_TIMEVAL(us)  rt_timer_ns2ticks((RTIME)us*1000)
    33 #define US_TO_TIMEVAL(us) us*1000LL
    39 
    34 
    40 #define TASK_HANDLE RT_TASK
    35 #define TASK_HANDLE pthread_t
    41 
    36 
    42 #endif
    37 #endif