mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-24 17:48:35 -04:00
AP_HAL_Linux: Add system_time_was_set to set system_time once
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
parent
a5c7303cd3
commit
3a74ad9105
@ -97,6 +97,8 @@ void Util::_toneAlarm_timer_tick() {
|
||||
void Util::set_system_clock(uint64_t time_utc_usec)
|
||||
{
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_LINUX_NONE
|
||||
_system_time_was_set = true;
|
||||
|
||||
timespec ts;
|
||||
ts.tv_sec = time_utc_usec/1.0e6;
|
||||
ts.tv_nsec = (time_utc_usec % 1000000) * 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user