feat(pinger): Configurable tick interval

This commit is contained in:
Nils Andreas Svee committed 2026-02-22 12:13:14 +07:00
1 parent 489e3f45f7
commit fa370b323b
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -91,11 +91,12 @@ pub trait PingSender {
id: u16,
type_: MeasurementType,
reflectors_lock: Arc<RwLock<Vec<IpAddr>>>,
tick_interval: f64,
) -> anyhow::Result<()> {
let mut socket = open_socket(type_)?;
let mut seq: u16 = 0;
let tick_duration_ms: u16 = 500;
let tick_duration_ms: u16 = (tick_interval * 1000.0) as u16;
loop {
let reflectors_unlocked = reflectors_lock.read().unwrap();