1 #ifndef _ADF_OS_TIME_PVT_H
2 #define _ADF_OS_TIME_PVT_H
5 #include "Magpie_api.h"
8 * @brief this code is modified version of tvtohz(9) which
9 * returns signed int which we don't require, hence we
10 * got rid of the type casting thing
12 * @return unsigned long
14 static inline unsigned long
17 return MSEC_TO_TICK(A_MILLISECONDS());
19 static inline a_uint32_t
20 __adf_os_ticks_to_msecs(unsigned long ticks)
22 return TICK_TO_MSEC(ticks);
24 static inline unsigned long
25 __adf_os_msecs_to_ticks(a_uint32_t msecs)
27 return MSEC_TO_TICK(msecs);
29 static inline unsigned long
30 __adf_os_getuptime(void)
32 return MSEC_TO_TICK(A_MILLISECONDS());;
36 __adf_os_udelay(int usecs)
42 __adf_os_mdelay(int msecs)
44 A_DELAY_USECS(msecs*1000);