|
|
@ -7506,9 +7506,9 @@ threadRun(void *arg) |
|
|
|
/* progress report is made by thread 0 for all threads */ |
|
|
|
/* progress report is made by thread 0 for all threads */ |
|
|
|
if (progress && thread->tid == 0) |
|
|
|
if (progress && thread->tid == 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pg_time_usec_t now = pg_time_now(); |
|
|
|
pg_time_usec_t now2 = pg_time_now(); |
|
|
|
|
|
|
|
|
|
|
|
if (now >= next_report) |
|
|
|
if (now2 >= next_report) |
|
|
|
{ |
|
|
|
{ |
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Horrible hack: this relies on the thread pointer we are |
|
|
|
* Horrible hack: this relies on the thread pointer we are |
|
|
@ -7516,7 +7516,7 @@ threadRun(void *arg) |
|
|
|
* entry of the threads array. That is why this MUST be done |
|
|
|
* entry of the threads array. That is why this MUST be done |
|
|
|
* by thread 0 and not any other. |
|
|
|
* by thread 0 and not any other. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
printProgressReport(thread, thread_start, now, |
|
|
|
printProgressReport(thread, thread_start, now2, |
|
|
|
&last, &last_report); |
|
|
|
&last, &last_report); |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
@ -7526,7 +7526,7 @@ threadRun(void *arg) |
|
|
|
do |
|
|
|
do |
|
|
|
{ |
|
|
|
{ |
|
|
|
next_report += (int64) 1000000 * progress; |
|
|
|
next_report += (int64) 1000000 * progress; |
|
|
|
} while (now >= next_report); |
|
|
|
} while (now2 >= next_report); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|