查看: 2171|回复: 1

[求助] 关于函数_time_get(TIME_STRUCT_PTR);的问题

[复制链接]

该用户从未签到

51

主题

307

帖子

0

高级会员

Rank: 4

积分
651
最后登录
2020-9-4
发表于 2014-2-19 09:55:20 | 显示全部楼层 |阅读模式
我运行_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;
 
我知道答案 目前已有0人回答
回复

使用道具 举报

该用户从未签到

51

主题

307

帖子

0

高级会员

Rank: 4

积分
651
最后登录
2020-9-4
 楼主| 发表于 2014-2-24 10:54:22 | 显示全部楼层

回复:关于函数_time_get(TIME_STRUCT_PTR);的问题

自己顶一下!有请大侠帮忙!!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /3 下一条

Archiver|手机版|小黑屋|恩智浦技术社区

GMT+8, 2025-7-18 21:43 , Processed in 0.109453 second(s), 22 queries , MemCache On.

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表