How to get the system tick count in MQX 5?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to get the system tick count in MQX 5?

跳至解决方案
2,223 次查看
WilliamLiSH
Contributor II

Hi,

I would like to add the elapsed time after power on in the debug message to specify the time sequence of code running and I prefer to use the system tick. However, I did not find the function interface to get current system tick.

Could you please help specify which interface should be used? Or is there any alternative solution for this purpose?

Hope to get your reply soon.

标记 (1)
0 项奖励
回复
1 解答
2,172 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi @WilliamLiSH 

 

For elapsed time,  I would suggest you use _time_get_elapsed() in second/millisecond time.

or in tick time with  _time_get_elapsed_ticks().

 

Regards

Daniel

在原帖中查看解决方案

0 项奖励
回复
2 回复数
2,173 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi @WilliamLiSH 

 

For elapsed time,  I would suggest you use _time_get_elapsed() in second/millisecond time.

or in tick time with  _time_get_elapsed_ticks().

 

Regards

Daniel

0 项奖励
回复
2,134 次查看
WilliamLiSH
Contributor II

Thanks for your reply. I use _time_get_elapsed_us() and it works now.

0 项奖励
回复