mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-25 15:16:07 +00:00
Fix #21: High CPU usage in a small project
This commit is contained in:
@@ -22,6 +22,7 @@ pub mod vfs_watch;
|
|||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
use core::Config;
|
use core::Config;
|
||||||
use pathext::canonicalish;
|
use pathext::canonicalish;
|
||||||
@@ -193,7 +194,9 @@ fn main() {
|
|||||||
|
|
||||||
println!("Server listening on port {}", port);
|
println!("Server listening on port {}", port);
|
||||||
|
|
||||||
loop {}
|
loop {
|
||||||
|
thread::sleep(Duration::from_secs(1));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
("pack", _) => {
|
("pack", _) => {
|
||||||
eprintln!("'rojo pack' is not yet implemented!");
|
eprintln!("'rojo pack' is not yet implemented!");
|
||||||
|
|||||||
@@ -92,6 +92,8 @@ impl VfsWatcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loop {}
|
loop {
|
||||||
|
thread::sleep(Duration::from_secs(1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user