rba-sdl2: Trying spin_sleep crate

Former-commit-id: 1c6a36a1a61be3949080a8c86915235aaf25d0e5
This commit is contained in:
Michel Heily 2019-12-20 19:02:33 +02:00
parent 31eb12cb6a
commit 38e504515b
2 changed files with 4 additions and 1 deletions

View file

@ -24,6 +24,7 @@ bitflags = "1.1.0"
zip = "0.5.3"
ctrlc = "3.1.3"
cpal="0.10.0"
spin_sleep="0.3.7"
[[bin]]
name = "rba-sdl2"

View file

@ -2,6 +2,8 @@ extern crate sdl2;
use sdl2::event::Event;
use sdl2::keyboard::Keycode;
extern crate spin_sleep;
use std::cell::RefCell;
use std::rc::Rc;
@ -115,7 +117,7 @@ fn main() {
match delay {
None => {}
Some(delay) => {
::std::thread::sleep(delay);
spin_sleep::sleep(delay);
}
};
}