Diffstat (limited to 'noncore/settings/netsystemtime/ntp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp index 7971f9a..40b5531 100644 --- a/noncore/settings/netsystemtime/ntp.cpp +++ b/noncore/settings/netsystemtime/ntp.cpp | |||
@@ -158,17 +158,18 @@ void Ntp::ntpFinished(OProcess *p) | |||
158 | TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); | 158 | TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); |
159 | TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds")); | 159 | TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds")); |
160 | if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value()) | 160 | if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value()) |
161 | { | 161 | { |
162 | cfg.setGroup("lookup_"+QString::number(lookupCount)); | 162 | cfg.setGroup("lookup_"+QString::number(lookupCount)); |
163 | lookupCount++; | 163 | lookupCount++; |
164 | cfg.writeEntry("count",lookupCount); | ||
165 | _shiftPerSec = timeShift / secsSinceLast; | 164 | _shiftPerSec = timeShift / secsSinceLast; |
166 | qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec); | 165 | qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec); |
167 | cfg.writeEntry("secsSinceLast",secsSinceLast); | 166 | cfg.writeEntry("secsSinceLast",secsSinceLast); |
168 | cfg.writeEntry("timeShift",QString::number(timeShift)); | 167 | cfg.writeEntry("timeShift",QString::number(timeShift)); |
168 | cfg.setGroup("lookups"); | ||
169 | cfg.writeEntry("count",lookupCount); | ||
169 | cfg.writeEntry("lastNtp",true); | 170 | cfg.writeEntry("lastNtp",true); |
170 | } | 171 | } |
171 | } | 172 | } |
172 | 173 | ||
173 | 174 | ||
174 | float Ntp::getTimeShift() | 175 | float Ntp::getTimeShift() |