/**
* Get the number of cycles since boot from the default timer.
*
* @return
* The number of cycles
*/
static inline uint64_t
rte_get_timer_cycles(void)
{
#ifdef RTE_LIBEAL_USE_HPET
switch(eal_timer_source) {
case EAL_TIMER_TSC:
#endif
return rte_get_tsc_cycles();
#ifdef RTE_LIBEAL_USE_HPET
case EAL_TIMER_HPET:
return rte_get_hpet_cycles();
default: rte_panic("Invalid timer source specified\n");
}
#endif
}
rte_get_timer_cycles()rte_get_hpet_cycles()
dpdk推荐使用rte_get_timer_cycles()和rte_get_timer_hz()API来替代HPET的特有API;如果一个应用使用了rte_get_hpet_cycles()和rte_get_hpet_hz()的API接口……
DPDK开启HPET高精度时钟方法

最低0.47元/天 解锁文章

2046

被折叠的 条评论
为什么被折叠?



