Convert time to use for _time_set

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

Convert time to use for _time_set

跳至解决方案
1,382 次查看
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 项奖励
回复
1 解答
693 次查看
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 项奖励
回复
2 回复数
694 次查看
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 项奖励
回复
693 次查看
cbursk
Contributor I
Thank you!
0 项奖励
回复