From 00e900b7508745b1ad65f671ae956a90a51e29d6 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 20 Mar 2019 17:01:39 +0100 Subject: [PATCH] weather: better naming for update cycle Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/727a63718a9b45504412b45a2b53238f83fc7a19 Author: vanhofen Date: 2019-03-20 (Wed, 20 Mar 2019) Origin message was: ------------------ - weather: better naming for update cycle --- src/gui/weather.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/weather.cpp b/src/gui/weather.cpp index 4ee1c9fc3..448c1d103 100644 --- a/src/gui/weather.cpp +++ b/src/gui/weather.cpp @@ -41,7 +41,7 @@ #include "weather.h" -#define MINUTES 15*60 +#define UPDATE_CYCLE 15 // minutes CWeather* CWeather::getInstance() { @@ -82,7 +82,7 @@ void CWeather::setCoords(std::string new_coords, std::string new_city) bool CWeather::checkUpdate(bool forceUpdate) { time_t current_time = time(NULL); - if (forceUpdate || (difftime(current_time,last_time) > MINUTES)) + if (forceUpdate || (difftime(current_time, last_time) > (UPDATE_CYCLE * 60))) return GetWeatherDetails(); else return false;