Make the dataengine alignment timer more precise
It can and does happen that in case of two clocks, one with seconds and one without, the one without gets 1s behind. That's because the alignment is not corrected when the difference is 1s, however in case of the clock this 1s is cruicial. REVIEW: 123300
This commit is contained in:
parent
07d8df77a1
commit
2fea7077c8
@ -89,9 +89,7 @@ void SignalRelay::checkAlignment()
|
||||
QTime t = QTime::currentTime();
|
||||
if (m_align == Plasma::Types::AlignToMinute) {
|
||||
int seconds = t.second();
|
||||
if (seconds > 2) {
|
||||
newTime = ((60 - seconds) * 1000) + 500;
|
||||
}
|
||||
newTime = ((60 - seconds) * 1000) + 500;
|
||||
} else if (m_align == Plasma::Types::AlignToHour) {
|
||||
int minutes = t.minute();
|
||||
int seconds = t.second();
|
||||
|
Loading…
x
Reference in New Issue
Block a user