mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 18:32:02 +00:00
feat: Implement configurable auto-sync pausing
This commit is contained in:
parent
c9c6320abb
commit
a4bf025fd0
1 changed files with 3 additions and 1 deletions
|
|
@ -205,7 +205,9 @@ async fn main() {
|
||||||
let state = sync_state.lock().unwrap();
|
let state = sync_state.lock().unwrap();
|
||||||
let config = sync_config.lock().unwrap();
|
let config = sync_config.lock().unwrap();
|
||||||
|
|
||||||
if config.auto_sync_enabled && state.latest.is_some() {
|
if config.is_auto_sync_paused() {
|
||||||
|
log::info!("Auto-sync is temporarily paused.");
|
||||||
|
} else if config.auto_sync_enabled && state.latest.is_some() {
|
||||||
let delta = state.get_ewma_clock_delta();
|
let delta = state.get_ewma_clock_delta();
|
||||||
let frame = state.latest.as_ref().unwrap();
|
let frame = state.latest.as_ref().unwrap();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue