sleep while waiting for pwm export

Co-authored-by: J M <2364004+Blu-J@users.noreply.github.com>
This commit is contained in:
Aiden McClelland
2022-01-24 13:26:51 -07:00
committed by Keagan McClelland
parent 3ab078a878
commit f01d9e9519

View File

@@ -40,7 +40,9 @@ impl SoundInterface {
let instant = Instant::now();
while tokio::fs::metadata(&*PERIOD_FILE).await.is_err()
&& instant.elapsed() < Duration::from_secs(1)
{}
{
tokio::time::sleep(Duration::from_millis(1));
}
Ok(SoundInterface(Some(guard)))
}
#[instrument(skip(self))]