mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 10:22:02 +00:00
Compare commits
2 commits
1842419f10
...
4cdead5aa4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cdead5aa4 | ||
|
|
d99b57a98a |
3 changed files with 3 additions and 4 deletions
|
|
@ -64,6 +64,7 @@ impl Config {
|
||||||
Self::default()
|
Self::default()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Config {
|
impl Default for Config {
|
||||||
|
|
|
||||||
|
|
@ -248,9 +248,7 @@ 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.is_auto_sync_paused() {
|
if config.auto_sync_enabled && state.latest.is_some() {
|
||||||
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();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::config::Config;
|
use crate::config::Config;
|
||||||
use crate::sync_logic::LtcFrame;
|
use crate::sync_logic::LtcFrame;
|
||||||
use chrono::{DateTime, Duration as ChronoDuration, Local, NaiveTime, TimeZone};
|
use chrono::{DateTime, Duration as ChronoDuration, Local, TimeZone};
|
||||||
use num_rational::Ratio;
|
use num_rational::Ratio;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue