Calculation of Duration between two DATE_STRUCT of mqx.h file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Calculation of Duration between two DATE_STRUCT of mqx.h file

Jump to solution
630 Views
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 Kudos
1 Solution
398 Views
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

View solution in original post

0 Kudos
2 Replies
399 Views
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 Kudos
398 Views
utsavikalpesh
Contributor V

Thnx Carlos

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

0 Kudos