mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 00:58:37 -04:00
HAL_Linux: Adjust set_system_clock
Do nothing for HAL_BOARD_SUBTYPE_NONE.
This commit is contained in:
parent
974f243c7e
commit
2b74d018fe
@ -54,10 +54,12 @@ void LinuxUtil::_toneAlarm_timer_tick(){
|
||||
|
||||
void LinuxUtil::set_system_clock(uint64_t time_utc_usec)
|
||||
{
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_NONE
|
||||
timespec ts;
|
||||
ts.tv_sec = time_utc_usec/1.0e6;
|
||||
ts.tv_nsec = (time_utc_usec % 1000000) * 1000;
|
||||
clock_settime(CLOCK_REALTIME, &ts);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
||||
|
Loading…
Reference in New Issue
Block a user