author | tille <tille> | 2002-06-20 22:13:34 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-20 22:13:34 (UTC) |
commit | c2eb66bc5c5ac4225edff8b369026bd208f8c148 (patch) (unidiff) | |
tree | 2175ed4f4db02c7ae182c97bfabb0148d92f5295 /example/ntp.h | |
parent | de666dda3fab5b060071f3b037c04fcc4767870a (diff) | |
download | opie-c2eb66bc5c5ac4225edff8b369026bd208f8c148.zip opie-c2eb66bc5c5ac4225edff8b369026bd208f8c148.tar.gz opie-c2eb66bc5c5ac4225edff8b369026bd208f8c148.tar.bz2 |
here it is...
-rw-r--r-- | example/ntp.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/example/ntp.h b/example/ntp.h new file mode 100644 index 0000000..c9c2e9b --- a/dev/null +++ b/example/ntp.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef NTP_H | ||
2 | #define NTP_H | ||
3 | #include "ntpbase.h" | ||
4 | #include <qdatetime.h> | ||
5 | #include <qtimer.h> | ||
6 | |||
7 | class OProcess; | ||
8 | class QString; | ||
9 | |||
10 | |||
11 | class Ntp : public NtpBase | ||
12 | { | ||
13 | Q_OBJECT | ||
14 | |||
15 | public: | ||
16 | Ntp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
17 | ~Ntp(); | ||
18 | |||
19 | OProcess *ntpProcess; | ||
20 | |||
21 | private: | ||
22 | QString _ntpOutput; | ||
23 | int _maxOffset; | ||
24 | float _shiftPerSec; | ||
25 | QTimer *_nextCorrection; | ||
26 | float getTimeShift(); | ||
27 | int _minLookupDiff; | ||
28 | private slots: | ||
29 | void slotRunNtp(); | ||
30 | void getNtpOutput(OProcess *proc, char *buffer, int buflen); | ||
31 | void ntpFinished(OProcess*); | ||
32 | void correctClock(); | ||
33 | }; | ||
34 | |||
35 | #endif | ||