diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/makemhr/makemhr.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/utils/makemhr/makemhr.cpp b/utils/makemhr/makemhr.cpp index 42a384db..f10083a5 100644 --- a/utils/makemhr/makemhr.cpp +++ b/utils/makemhr/makemhr.cpp @@ -812,17 +812,16 @@ static void ReconstructHrirs(const HrirDataT *hData) /* Keep track of the number of IRs done, periodically reporting it. */ size_t count; - while((count=reconstructor.mDone.load()) != total) - { + do { + std::this_thread::sleep_for(std::chrono::milliseconds{50}); + + count = reconstructor.mDone.load(); size_t pcdone{count * 100 / total}; printf("\r%3zu%% done (%zu of %zu)", pcdone, count, total); fflush(stdout); - - std::this_thread::sleep_for(std::chrono::milliseconds{50}); - } - size_t pcdone{count * 100 / total}; - printf("\r%3zu%% done (%zu of %zu)\n", pcdone, count, total); + } while(count != total); + fputc('\n', stdout); if(thrd2.joinable()) thrd2.join(); if(thrd1.joinable()) thrd1.join(); |