summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntp.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp
index f60e38d..40805a0 100644
--- a/noncore/settings/netsystemtime/ntp.cpp
+++ b/noncore/settings/netsystemtime/ntp.cpp
@@ -100,7 +100,9 @@ bool Ntp::ntpDelayElapsed()
Config cfg("ntp",Config::User);
cfg.setGroup("lookups");
_lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0);
- return (_lookupDiff - (SpinBoxNtpDelay->value()*60)) > -60;
+ if (_lookupDiff < 0) return true;
+ int i =_lookupDiff - (SpinBoxNtpDelay->value()*60);
+ return i > -60;
}
QString Ntp::getNtpServer()