Telescope Control Library
UTCClock.h@0:6cb2eaf8b133, 2018-08-19 (annotated)
- Committer:
- caoyuan9642
- Date:
- Sun Aug 19 05:21:20 2018 +0000
- Revision:
- 0:6cb2eaf8b133
- Child:
- 5:2ee2c36f4d87
v0.1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
caoyuan9642 | 0:6cb2eaf8b133 | 1 | #include <time.h> |
caoyuan9642 | 0:6cb2eaf8b133 | 2 | |
caoyuan9642 | 0:6cb2eaf8b133 | 3 | #ifndef UTCCLOCK_H_ |
caoyuan9642 | 0:6cb2eaf8b133 | 4 | #define UTCCLOCK_H_ |
caoyuan9642 | 0:6cb2eaf8b133 | 5 | /** |
caoyuan9642 | 0:6cb2eaf8b133 | 6 | * This class provides an interface to a general clock that provides information about the current time. |
caoyuan9642 | 0:6cb2eaf8b133 | 7 | * In most systems, this class is implemented by RTCClock to read time from the RTC. |
caoyuan9642 | 0:6cb2eaf8b133 | 8 | */ |
caoyuan9642 | 0:6cb2eaf8b133 | 9 | class UTCClock |
caoyuan9642 | 0:6cb2eaf8b133 | 10 | { |
caoyuan9642 | 0:6cb2eaf8b133 | 11 | public: |
caoyuan9642 | 0:6cb2eaf8b133 | 12 | UTCClock() |
caoyuan9642 | 0:6cb2eaf8b133 | 13 | { |
caoyuan9642 | 0:6cb2eaf8b133 | 14 | } |
caoyuan9642 | 0:6cb2eaf8b133 | 15 | virtual ~UTCClock() |
caoyuan9642 | 0:6cb2eaf8b133 | 16 | { |
caoyuan9642 | 0:6cb2eaf8b133 | 17 | } |
caoyuan9642 | 0:6cb2eaf8b133 | 18 | |
caoyuan9642 | 0:6cb2eaf8b133 | 19 | virtual time_t getTime() = 0; |
caoyuan9642 | 0:6cb2eaf8b133 | 20 | virtual void setTime(time_t time) = 0; |
caoyuan9642 | 0:6cb2eaf8b133 | 21 | |
caoyuan9642 | 0:6cb2eaf8b133 | 22 | }; |
caoyuan9642 | 0:6cb2eaf8b133 | 23 | |
caoyuan9642 | 0:6cb2eaf8b133 | 24 | #endif /*UTCCLOCK_H_*/ |
caoyuan9642 | 0:6cb2eaf8b133 | 25 |