Convert time to use for _time_set

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

Convert time to use for _time_set

Jump to solution
1,374 Views
cbursk
Contributor I

Hello,

Very new and would appreciate any pointers.  I have an interface where I am getting the current time from a GPS and then want to set the system time to match.  I'm having trouble figuring out how to convert, the time (hours, minutes, seconds, decimal) to a TIME_STRUCT needed by _time_set().

 

Any ideas?

Thanks!

0 Kudos
Reply
1 Solution
685 Views
EAI
Contributor IV

Fill in a DATE_STRUCT and use _time_from_date, or fill in an MQX_XDATE_STRUCT, use _time_xdate_to_ticks followed by _time_set_ticks.

View solution in original post

0 Kudos
Reply
2 Replies
686 Views
EAI
Contributor IV

Fill in a DATE_STRUCT and use _time_from_date, or fill in an MQX_XDATE_STRUCT, use _time_xdate_to_ticks followed by _time_set_ticks.

0 Kudos
Reply
685 Views
cbursk
Contributor I
Thank you!
0 Kudos
Reply