Bug 330239

Summary: K3B uses the system clock for calculating elapsed and remaining time
Product: [Applications] k3b Reporter: catlover2 <invertedrat>
Component: generalAssignee: k3b developers <k3b>
Status: RESOLVED FIXED    
Severity: minor CC: aacid, invertedrat, johannesobermayr, trueg
Priority: NOR Flags: aacid: gardening?
Version: 2.0.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 2.0.3
Sentry Crash Report:
Attachments: System clock set to 9 days in the future.
System clock set to one week in the past.
System clock set to 9 days in the future.

Description catlover2 2014-01-21 08:51:40 UTC
The times that appear in the "Elapsed time:" and "Remaining:" indicators that appear when burning appear to be calculated based on the time between when the burn started and the current system time. This causes very inaccurate output if the system clock changes while burning, and it causes nonsense output if the current time is before the start time of the burn.

Reproducible: Always

Steps to Reproduce:
1. Start burning a disk or ISO.
2. Change your system clock while K3B is burning; one way to do this is with "date --set=".
3. Notice that K3B takes this change into account even though it should not.
Actual Results:  
K3B uses the system clock to calculate elapsed and remaining time, causing inaccurate output.

Expected Results:  
I expect K3B to display the correct elapsed and remaining time even if the system clock changes while it is burning.
Comment 1 catlover2 2014-01-21 09:00:02 UTC
Created attachment 84770 [details]
System clock set to 9 days in the future.
Comment 2 catlover2 2014-01-21 09:01:07 UTC
Created attachment 84771 [details]
System clock set to one week in the past.
Comment 3 catlover2 2014-01-21 09:02:58 UTC
Created attachment 84772 [details]
System clock set to 9 days in the future.
Comment 4 Johannes Obermayr 2014-09-29 22:51:10 UTC
http://qt-project.org/doc/qt-4.8/qelapsedtimer.html
Requires a bump of QT_MIN_VERSION to 4.7.0 in CMakeLists.txt
Comment 5 Johannes Obermayr 2014-11-02 15:39:56 UTC
Git commit a4dee50258e7678604348444a754ef2f3502b8db by Johannes Obermayr.
Committed on 30/09/2014 at 17:17.
Pushed by jobermayr into branch '2.0'.

Use QElapsedTimer to calculate remaining time.
Related: bug 315463
FIXED-IN: 2.0.3
REVIEW: 120459

M  +2    -0    CMakeLists.txt
M  +24   -32   src/k3bjobprogressdialog.cpp
M  +6    -7    src/k3bjobprogressdialog.h

http://commits.kde.org/k3b/a4dee50258e7678604348444a754ef2f3502b8db