use `MissedTickBehavior::Skip` on all intervals
parent
d8c6e1bd14
commit
3a2147d50f
|
@ -490,6 +490,7 @@ async fn handle_endless_source (gib: usize, throttle: Option <usize>)
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut interval = tokio::time::interval (Duration::from_millis (1000));
|
let mut interval = tokio::time::interval (Duration::from_millis (1000));
|
||||||
|
interval.set_missed_tick_behavior (tokio::time::MissedTickBehavior::Skip);
|
||||||
let mut blocks_sent = 0;
|
let mut blocks_sent = 0;
|
||||||
|
|
||||||
while blocks_sent < num_blocks {
|
while blocks_sent < num_blocks {
|
||||||
|
@ -771,6 +772,7 @@ pub async fn run_relay (
|
||||||
let state_2 = state.clone ();
|
let state_2 = state.clone ();
|
||||||
tokio::spawn (async move {
|
tokio::spawn (async move {
|
||||||
let mut reload_interval = tokio::time::interval (Duration::from_secs (60));
|
let mut reload_interval = tokio::time::interval (Duration::from_secs (60));
|
||||||
|
reload_interval.set_missed_tick_behavior (tokio::time::MissedTickBehavior::Skip);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
reload_interval.tick ().await;
|
reload_interval.tick ().await;
|
||||||
|
|
|
@ -106,6 +106,7 @@ impl Interval {
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut interval = tokio::time::interval (Duration::from_secs (60));
|
let mut interval = tokio::time::interval (Duration::from_secs (60));
|
||||||
|
interval.set_missed_tick_behavior (tokio::time::MissedTickBehavior::Skip);
|
||||||
|
|
||||||
let mut counter = 0_u64;
|
let mut counter = 0_u64;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue