mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 10:22:02 +00:00
removed TIME LOCK ACTIVE status, it should just use IN SYNC status
This commit is contained in:
parent
f39db7e67d
commit
d2c4f1a4af
1 changed files with 2 additions and 4 deletions
|
|
@ -160,8 +160,6 @@ impl LtcState {
|
|||
pub fn get_sync_status(delta_ms: i64, config: &Config) -> &'static str {
|
||||
if config.timeturner_offset.is_active() {
|
||||
"TIMETURNING"
|
||||
} else if config.auto_sync_enabled {
|
||||
"TIME LOCK ACTIVE"
|
||||
} else if delta_ms.abs() <= 8 {
|
||||
"IN SYNC"
|
||||
} else if delta_ms > 10 {
|
||||
|
|
@ -350,8 +348,8 @@ mod tests {
|
|||
assert_eq!(get_sync_status(-100, &config), "CLOCK BEHIND");
|
||||
|
||||
// Test auto-sync status
|
||||
config.auto_sync_enabled = true;
|
||||
assert_eq!(get_sync_status(0, &config), "TIME LOCK ACTIVE");
|
||||
// config.auto_sync_enabled = true;
|
||||
// assert_eq!(get_sync_status(0, &config), "IN SYNC");
|
||||
|
||||
// Test TIMETURNING status takes precedence
|
||||
config.timeturner_offset = TimeturnerOffset { hours: 1, minutes: 0, seconds: 0, frames: 0, milliseconds: 0 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue