author | tille <tille> | 2002-10-25 17:42:20 (UTC) |
---|---|---|
committer | tille <tille> | 2002-10-25 17:42:20 (UTC) |
commit | 1914dcb5988dff9e972ad67eb1eecd7452b88ffa (patch) (unidiff) | |
tree | 57b336a964de005ce1f2c4b699de50758bc220ea | |
parent | 8d7cfaf101c780c7b870234de5cc14b51544f6d6 (diff) | |
download | opie-1914dcb5988dff9e972ad67eb1eecd7452b88ffa.zip opie-1914dcb5988dff9e972ad67eb1eecd7452b88ffa.tar.gz opie-1914dcb5988dff9e972ad67eb1eecd7452b88ffa.tar.bz2 |
fixed neg lookuptime bug
-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 4 |
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() | |||
100 | Config cfg("ntp",Config::User); | 100 | Config cfg("ntp",Config::User); |
101 | cfg.setGroup("lookups"); | 101 | cfg.setGroup("lookups"); |
102 | _lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0); | 102 | _lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0); |
103 | return (_lookupDiff - (SpinBoxNtpDelay->value()*60)) > -60; | 103 | if (_lookupDiff < 0) return true; |
104 | int i =_lookupDiff - (SpinBoxNtpDelay->value()*60); | ||
105 | return i > -60; | ||
104 | } | 106 | } |
105 | 107 | ||
106 | QString Ntp::getNtpServer() | 108 | QString Ntp::getNtpServer() |