chinmoyr added inline comments.

INLINE COMMENTS

> davidedmundson wrote in slaveinterface.cpp:106
> That wasn't there in the old code because it has this guard:
> 
> const qint64 diff = currentTime - d->start_time;
> 
> (effectively calculating elapsed)
> 
> Then
> 
> if (diff - d->last_time >= 900) {
> 
> So we known first-last is non-zero
> 
> Should the new code be
> 
> https://phabricator.kde.org/P287 ?
> 
> It seemed to work for me.

Indeed that should be the code here.
The old code checked the elapsed time since last "calcSpeed()" call whereas the 
new code checks the elapsed time since the timer started.

> broulik wrote in slaveinterface.cpp:113
> We likely get a division by zero here for some reason

I doubt it will be zero here. `elapsed_time` stores elapsed time since the 
timer started so it will continue to grow (?) and the difference will always be 
> 0.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17528

To: chinmoyr, dfaure
Cc: davidedmundson, broulik, bruns, kde-frameworks-devel, michaelh, ngraham

Reply via email to