1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use anyhow::Result; #[tokio::main] async fn main() -> Result<()> { delouse::init()?; let handle = tokio::spawn(async move { loop { tokio::time::sleep(std::time::Duration::from_secs(1)).await; eprintln!("heartbeat"); } }); handle.await?; Ok(()) }