-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GDALTermProgress: display estimated remaining time for tasks >= 10 seconds #11152
Conversation
|
||
if (nThisTick <= nLastTick) | ||
return TRUE; | ||
|
||
const time_t nCurTime = time(nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the "modern" version would be std::chrono::system_clock::now()
but any advantage in this case is not not obvious...
Some changes suggested at rouault#62 This changes output for me somewhat, e.g.
but when the time estimate kicks in, the first part of the line ( |
fixed. I've changed the strategy to output as many |
…conds Refreshed every tick (so 2.5%) (only on interactive terminals. Tested with bash on Linux and cmd on Windows, but should work for all reasonable terminals) ``` Before 5 seconds: 0...10...20... After 5 seconds: 0...10...20...30...40...50 - estimated remaining time: 00:00:07 Upon completion: 0...10...20...30...40...50...60...70...80...90...100 - done in 00:00:13. ``` Fixes OSGeo#11100 Co-authored-by: Daniel Baston <[email protected]>
…le being processed
Refreshed every tick (so 2.5%)
(only on interactive terminals. Tested with bash on Linux and cmd on Windows, but should work for all reasonable terminals)
Fixes #11100