sleep/
sleep.rs

1use std::time::Duration;
2
3use simulon::{api, simulation::SimulationBuilder};
4
5async fn exec() {
6    api::sleep(Duration::from_secs(1_000)).await;
7    panic!("This should not be reached.");
8}
9
10pub fn main() {
11    SimulationBuilder::new(|| api::spawn(exec()))
12        .with_nodes(5)
13        .set_node_metrics_rate(Duration::ZERO)
14        .enable_progress_bar()
15        .run(Duration::from_secs(10));
16}