fixed dumb mistake in the timer interval for Clock and bgDate, now seconds are instant

This commit is contained in:
SomeElse
2026-05-25 07:31:11 +00:00
parent 1ba70f3f14
commit b9708ddfd0
2 changed files with 20 additions and 6 deletions

View File

@@ -99,16 +99,22 @@ PanelWindow {
}
}
property int lastSecond: -1
Timer {
interval: 1000
interval: 10
running: true
repeat: true
onTriggered: {
let d = new Date()
let tzd = TimezoneProvider.toTz(d)
secondsString = Qt.formatTime(tzd, "hh:mm:ss")
if (tzd.getHours() === 0 && tzd.getMinutes() === 0 && tzd.getSeconds() === 0)
updateDate(d)
let s = tzd.getSeconds()
if (s !== lastSecond) {
lastSecond = s
secondsString = Qt.formatTime(tzd, "hh:mm:ss")
if (tzd.getHours() === 0 && tzd.getMinutes() === 0 && tzd.getSeconds() === 0)
updateDate(d)
}
}
}
}