在线时间36 小时
UID423505
注册时间2013-3-27
NXP金币0
该用户从未签到
高级会员

- 积分
- 651
- 最后登录
- 2020-9-4
|
我运行_time_get(TIME_STRUCT_PTR);这个函数,为什么运行到下面的函数时,到了红色部分时,程序跑飞了,不向下运行了。
哪位大侠帮我解答一下。??????
boolean _psp_ticks_to_time
(
/* [IN] Pointer to the tick struct to store the results in */
PSP_TICK_STRUCT_PTR tick_ptr,
/* [OUT] Pointer to the time struct to convert */
TIME_STRUCT_PTR time_ptr
)
{ /* Body */
uint_64 tmp;
uint_32 tps;
KERNEL_DATA_STRUCT_PTR kernel_data;
_GET_KERNEL_DATA(kernel_data);
tps = kernel_data->TICKS_PER_SECOND;
/* Saturate if ticks go out of range of time struct */
if ( (tick_ptr->TICKS[0] / tps) > MAX_UINT_32) {
time_ptr->SECONDS = MAX_UINT_32;
time_ptr->MILLISECONDS = 999;
return FALSE;
} /* Endif */
/* Recompute TICKS to milliseconds, together with HW_TICKS */
tmp = (tick_ptr->TICKS[0] * 1000) + (tick_ptr->HW_TICKS[0] * 1000 / kernel_data->HW_TICKS_PER_TICK);
tmp = tmp / tps;
/* Compute seconds and remainder from milliseconds value */
time_ptr->SECONDS = tmp / 1000;
time_ptr->MILLISECONDS = tmp - time_ptr->SECONDS * 1000;
return TRUE;
|
|