Changeset 77252 in vbox for trunk/src/VBox/Main/src-all
- Timestamp:
- Feb 11, 2019 8:42:08 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/ProgressImpl.cpp
r77204 r77252 572 572 uint64_t ullTimeElapsed = ullTimeNow - m_ullTimestamp; 573 573 uint64_t ullTimeTotal = (uint64_t)((double)ullTimeElapsed * 100 / dPercentDone); 574 int64_t ullTimeRemaining =ullTimeTotal - ullTimeElapsed;574 uint64_t ullTimeRemaining = (ullTimeTotal < ullTimeElapsed) ? 0 : ullTimeTotal - ullTimeElapsed; 575 575 576 576 // LogFunc(("dPercentDone = %RI32, ullTimeNow = %RI64, ullTimeElapsed = %RI64, ullTimeTotal = %RI64, ullTimeRemaining = %RI64\n", 577 577 // (uint32_t)dPercentDone, ullTimeNow, ullTimeElapsed, ullTimeTotal, ullTimeRemaining)); 578 578 579 *aTimeRemaining = (LONG)( ullTimeRemaining/ 1000);579 *aTimeRemaining = (LONG)(RT_MIN(ullTimeRemaining, RT_MS_1HOUR_64*24*365) / 1000); 580 580 } 581 581 }
Note:
See TracChangeset
for help on using the changeset viewer.