Telescope Control Library
Diff: UTCClock.h
- Revision:
- 18:3ea58b079adc
- Parent:
- 5:2ee2c36f4d87
diff -r 7e47bc1630c0 -r 3ea58b079adc UTCClock.h --- a/UTCClock.h Fri Sep 14 21:09:02 2018 -0400 +++ b/UTCClock.h Sun Sep 23 02:32:42 2018 -0400 @@ -6,22 +6,25 @@ * This class provides an interface to a general clock that provides information about the current time. * In most systems, this class is implemented by RTCClock to read time from the RTC. */ -class UTCClock -{ +class UTCClock { public: - UTCClock() - { + UTCClock() { } - virtual ~UTCClock() - { + virtual ~UTCClock() { } /** @return current UTC time in Unix timestamp format - */ + */ virtual time_t getTime() = 0; - + + /** @return current UTC time in high resolution (fraction of seconds) + */ + virtual double getTimeHighResolution() { + return (double) getTime(); + } + /** Set system time - */ + */ virtual void setTime(time_t time) = 0; };