mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-18 13:44:26 +00:00
progress: use common duration constants
New update interval is 33ms, but I don't think that would matter.
This commit is contained in:
parent
02bb3aecf3
commit
1b0feb913d
@ -182,7 +182,7 @@ pub fn snapshot_progress(ui: &mut Ui) -> Option<impl Fn(&RepoPath) + '_> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't clutter the output during fast operations.
|
// Don't clutter the output during fast operations.
|
||||||
let next_display_time = Instant::now() + Duration::from_millis(250);
|
let next_display_time = Instant::now() + INITIAL_DELAY;
|
||||||
let state = Mutex::new(State {
|
let state = Mutex::new(State {
|
||||||
guard: None,
|
guard: None,
|
||||||
ui,
|
ui,
|
||||||
@ -197,7 +197,7 @@ pub fn snapshot_progress(ui: &mut Ui) -> Option<impl Fn(&RepoPath) + '_> {
|
|||||||
// better handle large single files
|
// better handle large single files
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.next_display_time = now + Duration::from_millis(10);
|
state.next_display_time = now + Duration::from_secs(1) / UPDATE_HZ;
|
||||||
|
|
||||||
if state.guard.is_none() {
|
if state.guard.is_none() {
|
||||||
state.guard = Some(
|
state.guard = Some(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user