added clock class

This commit is contained in:
2018-11-22 11:50:11 +01:00
parent 2769d52fc9
commit e5d96c0e84
4 changed files with 117 additions and 22 deletions

31
Software/src/clock.h Normal file
View File

@ -0,0 +1,31 @@
/*
* clock.h
*
* Created on: 22.11.2018
* Author: Hendrik Schutter
*/
#ifndef SRC_CLOCK_H_
#define SRC_CLOCK_H_
struct time_t {
uint8_t diffHour;
uint8_t diffMinute;
uint8_t diffSecond;
uint32_t seconds;
};
class clock {
private:
void clock_init();
public:
clock();
~clock();
uint32_t getTime(); //time in sec since boot
struct time_t getTime(struct time_t pTime); //time in sec since time stamp
};
#endif /* SRC_CLOCK_H_ */