Skip to content

Commit

Permalink
don't use fucking 100% cpu on one core
Browse files Browse the repository at this point in the history
  • Loading branch information
JojiiOfficial committed Jan 22, 2021
1 parent ef50c77 commit aafccb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::path::Path;
use std::{path::Path, thread, time::Duration};

use mpris::PlayerFinder;
use pulsectl::controllers::{DeviceControl, SinkController};
Expand All @@ -19,6 +19,7 @@ fn main() {
let mut state = KeyState::default();

loop {
thread::sleep(Duration::from_millis(10));
for ev in device.events_no_sync().unwrap() {
if ev._type != 1 {
continue;
Expand Down

0 comments on commit aafccb6

Please sign in to comment.