mirror of
https://github.com/Zenithsiz/zbuild.git
synced 2026-02-03 14:10:02 +00:00
Fixed cpu usage being pinned at 100% when watching.
This was due to the default timeout being 0ms.
This commit is contained in:
parent
f7f867ff91
commit
8ca24b6ba6
@ -145,7 +145,7 @@ async fn main() -> ExitResult {
|
||||
.watch
|
||||
.then(|| {
|
||||
// TODO: Better default?
|
||||
let debouncer_timeout_ms = args.watcher_debouncer_timeout_ms.unwrap_or(0.0_f64);
|
||||
let debouncer_timeout_ms = args.watcher_debouncer_timeout_ms.unwrap_or(10.0_f64);
|
||||
let debouncer_timeout = { Duration::from_secs_f64(debouncer_timeout_ms / 1000.0) };
|
||||
|
||||
Watcher::new(builder.subscribe_events(), debouncer_timeout)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user