-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
Describe problem solved by the proposed feature
因为驱动里经常要调用超时判断功能 , linux 和 uboot 都有相似函数。
还有请加bitops , linux 和 uboot 都有 ,经常用的。
Describe your preferred solution
rt_tick_t rt_delta_tick_get(rt_tick_t last_time)
{
rt_tick_t tnow = rt_tick_get();
if (tnow >= last_time) {
return (tnow - last_time);
} else {
return (RT_TICK_MAX - last_time + tnow + 1);
}
}
bitops 可以从linux 或 uboot 移植过来
Describe possible alternatives
No response
Ryan-CW-Code
Metadata
Metadata
Assignees
Labels
No labels