author | tille <tille> | 2002-06-20 22:35:23 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-20 22:35:23 (UTC) |
commit | 43aa943f7d112e0e0853e0f2280d876d78346fe5 (patch) (side-by-side diff) | |
tree | 73a5f9e3d85f5d87aa075a89bac083da95344888 /noncore/settings/netsystemtime/ntp.h | |
parent | 99acb72cb2bd8d5d647aad891f001d8ef2c8d96d (diff) | |
download | opie-43aa943f7d112e0e0853e0f2280d876d78346fe5.zip opie-43aa943f7d112e0e0853e0f2280d876d78346fe5.tar.gz opie-43aa943f7d112e0e0853e0f2280d876d78346fe5.tar.bz2 |
again ;)
Diffstat (limited to 'noncore/settings/netsystemtime/ntp.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/ntp.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/noncore/settings/netsystemtime/ntp.h b/noncore/settings/netsystemtime/ntp.h new file mode 100644 index 0000000..4dc04b1 --- a/dev/null +++ b/noncore/settings/netsystemtime/ntp.h @@ -0,0 +1,37 @@ +#ifndef NTP_H +#define NTP_H +#include "ntpbase.h" +#include <qdatetime.h> +#include <qtimer.h> + +class OProcess; +class QString; + + +class Ntp : public NtpBase +{ + Q_OBJECT + +public: + Ntp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~Ntp(); + + OProcess *ntpProcess; + +private: + QString _ntpOutput; + int _maxOffset; + float _shiftPerSec; + QTimer *_nextCorrection; + int _minLookupDiff; + + float getTimeShift(); + void readLookups(); +private slots: + void slotRunNtp(); + void getNtpOutput(OProcess *proc, char *buffer, int buflen); + void ntpFinished(OProcess*); + void correctClock(); +}; + +#endif |