Code review comment for lp:~nik90/ubuntu-clock-app/timer-code-refactor

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

> this function totalTime:
>
> 1059 storageTimer.setTimerValue(namePreset.text,
> TScript.totalSeconds(hours, minutes, seconds));
>
> Does not return the same value as:
>
> does not return the same value as:
>
> 465 + property alias totalTime: analogTimer.totalTime;

The analogTimer.totalTime variable only hold the total time (in seconds) when the start button is pressed. So in other situations, it is necessary to calculate the total time as and when required. The reason for this is because, the timerHand manipulates the seconds, minutes and hours and not the total time. It would be a waste to calculate the total time every time the user moves the timerHand.

So storageTimer.setTimerValue(namePreset.text,TScript.totalSeconds(hours, minutes, seconds)); is a valid function call.

« Back to merge proposal