# HG changeset patch # User Sebastien Jodogne # Date 1629292599 -7200 # Node ID e1711b6e141f3ac16be421a5457f64dccb4ec1ce # Parent 388d108f6e4b9888167dcbeb901c522230a616e6 Fix computation of the estimated time of arrival in jobs diff -r 388d108f6e4b -r e1711b6e141f NEWS --- a/NEWS Mon Aug 16 10:54:38 2021 +0200 +++ b/NEWS Wed Aug 18 15:16:39 2021 +0200 @@ -14,6 +14,7 @@ * Added file CITATION.cff * Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins * Fix upload of ZIP archives containing a DICOMDIR file +* Fix computation of the estimated time of arrival in jobs Version 1.9.6 (2021-07-21) diff -r 388d108f6e4b -r e1711b6e141f OrthancFramework/Sources/JobsEngine/JobInfo.cpp --- a/OrthancFramework/Sources/JobsEngine/JobInfo.cpp Mon Aug 16 10:54:38 2021 +0200 +++ b/OrthancFramework/Sources/JobsEngine/JobInfo.cpp Wed Aug 18 15:16:39 2021 +0200 @@ -70,8 +70,8 @@ if (status_.GetProgress() > 0.01f && ms > 0.01f) { - float ratio = static_cast(1.0 - status_.GetProgress()); - long long remaining = boost::math::llround(ratio * ms); + float progress = status_.GetProgress(); + long long remaining = boost::math::llround(ms / progress * (1.0f - progress)); eta_ = timestamp_ + boost::posix_time::milliseconds(remaining); hasEta_ = true; }