问题如题
UTCTime osal_getClock( void )这个函数调用比了,
ICall_getTicks(void)这个函数出来的值感觉不对,
请问是具体是那个接口回去实时时钟,谢谢!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
问题如题
UTCTime osal_getClock( void )这个函数调用比了,
ICall_getTicks(void)这个函数出来的值感觉不对,
请问是具体是那个接口回去实时时钟,谢谢!
你好!
我查看了一下,是不是拿ICall_getTicks()接口得到的数据要进一步处理,
比如得到值用T表示,时钟周期用t表示,
time=T/1000/t
hanbin,
系统的时间,就是tick,都是相对的时间,包括前面的osal接口得到的数据。
ICall_getTicks() 得到的也是个32位的相对时间,从系统上电开始。单位是ms。
所以你顶多能通过这个算出系统启动到现在过了多少毫秒,或者自己转换成多少天多少小时多少秒。32位的数据满之后,还会自动清零。