00001 #ifndef KAL_TIME_H_
00002 #define KAL_TIME_H_
00003
00004 #include "kal_config.h"
00005
00006 #ifdef KAL_USE_HRTIMER
00007 # include "kal_time_timespec.h"
00008 #else
00009 # include "kal_time_jiffies.h"
00010 #endif
00011
00012 #ifdef QOS_KS
00013
00015 static inline ktime_t kal_time2ktime(kal_time_t t) {
00016 return ktime_set(kal_time_get_sec(t), kal_time_get_nsec(t));
00017 }
00018
00020 static inline kal_time_t kal_ktime2time(ktime_t kt) {
00021 struct timespec ts = ktime_to_timespec(kt);
00022 return kal_time_ns(ts.tv_sec, ts.tv_nsec);
00023 }
00024
00025 #endif
00026
00027 #endif