await sleep

This commit is contained in:
Aiden McClelland
2022-01-24 15:37:02 -07:00
committed by Aiden McClelland
parent f01d9e9519
commit bf7ceb6125

View File

@@ -41,7 +41,7 @@ impl SoundInterface {
while tokio::fs::metadata(&*PERIOD_FILE).await.is_err()
&& instant.elapsed() < Duration::from_secs(1)
{
tokio::time::sleep(Duration::from_millis(1));
tokio::time::sleep(Duration::from_millis(1)).await;
}
Ok(SoundInterface(Some(guard)))
}