Formatting
This commit is contained in:
parent
80c7f663f1
commit
916d86cd97
3 changed files with 8 additions and 11 deletions
|
|
@ -40,22 +40,19 @@ Singleton {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
Timer {
|
||||
id: updateTimer
|
||||
interval: 60 * 1000
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
updateWeather();
|
||||
updateWeather()
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------
|
||||
function init() {
|
||||
// does nothing but ensure the singleton is created
|
||||
function init() {// does nothing but ensure the singleton is created
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------
|
||||
function updateWeather() {
|
||||
if ((data.weatherLastFetch === "") || (Time.timestamp >= data.weatherLastFetch + weatherUpdateFrequency)) {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Singleton {
|
|||
|
||||
// Returns a Unix Timestamp (in seconds)
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue