Merge branch 'main' of http://alex-freenas.ddns.net:3000/M/VisualSapfor
This commit is contained in:
@@ -157,10 +157,11 @@ public:
|
||||
vector<T*> toDel;
|
||||
|
||||
size_t done = 0;
|
||||
size_t step = ceil(totalProcessTasks * 0.02); // step == 2%
|
||||
size_t step = ceil(totalProcessTasks * 0.01); // step == 1%
|
||||
const double total = totalProcessTasks;
|
||||
|
||||
auto timer_start = Utils::getAbsoluteTime();
|
||||
auto timer_pause = Utils::getAbsoluteTime();
|
||||
|
||||
while (activeTasks) {
|
||||
long oldActiveTasks = activeTasks;
|
||||
emptyKeys.clear();
|
||||
@@ -227,13 +228,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// прошло больше 10 секунд, проверяем паузу
|
||||
if (Utils::getAbsoluteTime() - timer_start > 30) {
|
||||
// прошло больше 30 секунд, проверяем паузу
|
||||
if (Utils::getAbsoluteTime() - timer_pause > 30) {
|
||||
printf("stoped\n");
|
||||
while (checkPause()) {
|
||||
Utils::Sleep(10);
|
||||
}
|
||||
timer_start = Utils::getAbsoluteTime();
|
||||
timer_pause = Utils::getAbsoluteTime();
|
||||
printf("resume\n");
|
||||
}
|
||||
}
|
||||
@@ -253,6 +254,11 @@ public:
|
||||
}
|
||||
|
||||
void saveProgress(long long persentDone) {
|
||||
/*String dump_progress = "echo '";
|
||||
dump_progress = dump_progress + to_string(persentDone).c_str() + "' > progress";
|
||||
|
||||
system(dump_progress.getCharArray());*/
|
||||
|
||||
FILE* f = fopen("progress", "w");
|
||||
if (f) {
|
||||
fprintf(f, "%lld", persentDone);
|
||||
|
||||
@@ -1 +1 @@
|
||||
12
|
||||
13
|
||||
Reference in New Issue
Block a user