Skip to content

Commit

Permalink
Fix negative estimated remaining time due to 64-bit integer overflow …
Browse files Browse the repository at this point in the history
…on large files.

(cherry picked from commit b27d4e7)
  • Loading branch information
qris committed Oct 7, 2017
1 parent b08bd5f commit 64405ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common/ReadLoggingStream.cpp
Expand Up @@ -65,7 +65,7 @@ int ReadLoggingStream::Read(void *pBuffer, int NBytes, int Timeout)
{
box_time_t timeNow = GetCurrentBoxTime();
box_time_t elapsed = timeNow - mStartTime;
box_time_t finish = (elapsed * mLength) / mTotalRead;
box_time_t finish = ((float)elapsed * (float)mLength) / mTotalRead;
// box_time_t remain = finish - elapsed;
mrLogger.Log(numBytesRead, mOffset, mLength, elapsed, finish);
}
Expand Down

0 comments on commit 64405ac

Please sign in to comment.