author | tille <tille> | 2002-07-01 17:12:30 (UTC) |
---|---|---|
committer | tille <tille> | 2002-07-01 17:12:30 (UTC) |
commit | fcdf02d10c738c95748f082eaf40cb47db6d2975 (patch) (side-by-side diff) | |
tree | 96281f0d0b2a969815a3e67418c61783f9d134b1 /noncore/settings | |
parent | dbdd9ea2e38fbe280fc4d648fbd3709e101d7eed (diff) | |
download | opie-fcdf02d10c738c95748f082eaf40cb47db6d2975.zip opie-fcdf02d10c738c95748f082eaf40cb47db6d2975.tar.gz opie-fcdf02d10c738c95748f082eaf40cb47db6d2975.tar.bz2 |
s
-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 @@ -152,29 +152,30 @@ void Ntp::ntpFinished(OProcess *p) int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); cfg.writeEntry("time", time); float timeShift = getTimeShift(); if (timeShift == 0.0) return; int secsSinceLast = time - lastLookup; TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds")); if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value()) { cfg.setGroup("lookup_"+QString::number(lookupCount)); lookupCount++; - cfg.writeEntry("count",lookupCount); _shiftPerSec = timeShift / secsSinceLast; qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec); cfg.writeEntry("secsSinceLast",secsSinceLast); cfg.writeEntry("timeShift",QString::number(timeShift)); + cfg.setGroup("lookups"); + cfg.writeEntry("count",lookupCount); cfg.writeEntry("lastNtp",true); } } float Ntp::getTimeShift() { QString _offset = "offset"; QString _sec = "sec"; QRegExp _reOffset = QRegExp(_offset); QRegExp _reEndOffset = QRegExp(_sec); int posOffset = _reOffset.match( _ntpOutput ); |