Calculation of Duration between two DATE_STRUCT of mqx.h file

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

Calculation of Duration between two DATE_STRUCT of mqx.h file

跳至解决方案
1,393 次查看
utsavikalpesh
Contributor V

Hi,

I am user of MQX v4.0 and of Code warrior v10.2.

I am wroking on a project in which I need to use date_struct of mqx.h file for fill up the start time /date as well as to fill up End Time/Date on event. Now I required to calculate the duration between this two events time.

For example,

Struct DATE_STRUCT StartEventDateTime;

Struct DATE_STRUCT EndEventDateTime;

now i want this event duration between StartEventDateTime and EndEventDateTime.

Is MQX providing any function to calculate this duration??

Note:

I want to know the inbuilt function facility that is gives me duration.

I right now calculating this duration manually from Hour,Minute and Second.

Pls reply...

0 项奖励
回复
1 解答
1,161 次查看
Carlos_Musich
NXP Employee
NXP Employee

Hi Utsavi,

You can use following functions and manipulate the results to make the desired operation.

_ticks_to_time

_time_to_ticks

_time_diff

_time_diff_ticks

_time_from_date

_time_get

_time_get_ticks

_time_get_elapsed

_time_get_elapsed_ticks

and many other time functions that are described in MQX_Reference_Manual.pdf which is located in

C:\Freescale\Freescale_MQX_4_1\doc\mqx

Regards,

Carlos

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,162 次查看
Carlos_Musich
NXP Employee
NXP Employee

Hi Utsavi,

You can use following functions and manipulate the results to make the desired operation.

_ticks_to_time

_time_to_ticks

_time_diff

_time_diff_ticks

_time_from_date

_time_get

_time_get_ticks

_time_get_elapsed

_time_get_elapsed_ticks

and many other time functions that are described in MQX_Reference_Manual.pdf which is located in

C:\Freescale\Freescale_MQX_4_1\doc\mqx

Regards,

Carlos

0 项奖励
回复
1,161 次查看
utsavikalpesh
Contributor V

Thnx Carlos

On Wed, Aug 13, 2014 at 4:11 AM, Carlos Alberto Musich Cuevas <

0 项奖励
回复