diff --git a/rslib/src/import_export/mod.rs b/rslib/src/import_export/mod.rs index 8f9825e59..171c7bd32 100644 --- a/rslib/src/import_export/mod.rs +++ b/rslib/src/import_export/mod.rs @@ -21,10 +21,9 @@ pub(crate) struct IncrementableProgress
{
progress_fn: Box IncrementableProgress {
/// `progress_fn: (progress, throttle) -> should_continue`
pub(crate) fn new(progress_fn: impl 'static + FnMut(P, bool) -> bool) -> Self {
@@ -32,6 +31,7 @@ impl IncrementableProgress {
progress_fn: Box::new(progress_fn),
count_map: None,
count: 0,
+ update_interval: 17,
}
}
@@ -47,7 +47,7 @@ impl IncrementableProgress {
/// Must have called `set_count_map()` before calling this.
pub(crate) fn increment(&mut self) -> Result<()> {
self.count += 1;
- if self.count % UPDATE_INTERVAL != 0 {
+ if self.count % self.update_interval != 0 {
return Ok(());
}
let progress = self.mapped_progress()?;