Formatting

This commit is contained in:
quadbyte 2025-08-11 18:06:32 -04:00
parent 80c7f663f1
commit 916d86cd97
3 changed files with 8 additions and 11 deletions

View file

@ -40,22 +40,19 @@ Singleton {
} }
} }
Timer { Timer {
id: updateTimer id: updateTimer
interval: 60 * 1000 interval: 60 * 1000
repeat: true repeat: true
onTriggered: { onTriggered: {
updateWeather(); updateWeather()
} }
} }
// -------------------------------- // --------------------------------
function init() { function init() {// does nothing but ensure the singleton is created
// does nothing but ensure the singleton is created
} }
// -------------------------------- // --------------------------------
function updateWeather() { function updateWeather() {
if ((data.weatherLastFetch === "") || (Time.timestamp >= data.weatherLastFetch + weatherUpdateFrequency)) { if ((data.weatherLastFetch === "") || (Time.timestamp >= data.weatherLastFetch + weatherUpdateFrequency)) {

View file

@ -40,7 +40,7 @@ Singleton {
// Returns a Unix Timestamp (in seconds) // Returns a Unix Timestamp (in seconds)
readonly property string timestamp: { readonly property string timestamp: {
return Math.floor(Date.now() / 1000); return Math.floor(Date.now() / 1000)
} }
// Format an easy to read approximate duration ex: 4h32m // Format an easy to read approximate duration ex: 4h32m