reflector_selector: Simplify setting sleep time
This commit is contained in:
1 parent
e9fb811a58
commit
bb9d1ed4af
1 file changed
+2
-4
@@ -21,10 +21,8 @@ impl ReflectorSelector {
|
|||||||
pub fn run(&self) -> anyhow::Result<()> {
|
pub fn run(&self) -> anyhow::Result<()> {
|
||||||
let mut selector_sleep_time = Duration::new(30, 0);
|
let mut selector_sleep_time = Duration::new(30, 0);
|
||||||
let mut reselection_count = 0;
|
let mut reselection_count = 0;
|
||||||
let baseline_sleep_time = Duration::new(
|
let baseline_sleep_time =
|
||||||
(self.config.tick_interval * std::f64::consts::PI) as u64,
|
Duration::from_secs_f64(self.config.tick_interval * std::f64::consts::PI);
|
||||||
(((self.config.tick_interval * std::f64::consts::PI) % 1.0) * 1e9) as u32,
|
|
||||||
);
|
|
||||||
|
|
||||||
let mut rng = thread_rng();
|
let mut rng = thread_rng();
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user