MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / SetProgress

Method SetProgress

src/dialog_progress.cpp:248–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void DialogProgress::SetProgress(int target) {
249 pulse_timer.Stop();
250
251 if (target == progress_target) return;
252 using namespace std::chrono;
253
254 progress_anim_start_value = progress_current;
255 auto now = steady_clock::now();
256 if (progress_target == 0)
257 progress_anim_duration = 1000;
258 else
259 progress_anim_duration = std::max<int>(100, duration_cast<milliseconds>(now - progress_anim_start_time).count() * 11 / 10);
260 progress_anim_start_time = now;
261 progress_target = target;
262}

Callers 4

SetProgressMethod · 0.45
LuaSetProgressMethod · 0.45
DoIndexingMethod · 0.45
read_subtitlesFunction · 0.45

Calls 1

StopMethod · 0.45

Tested by

no test coverage detected