OpenChargeMicro/Software/src/clock.h

33 lines
525 B
C
Raw Normal View History

2018-11-22 11:50:11 +01:00
/*
* clock.h
*
* Created on: 22.11.2018
* Author: Hendrik Schutter
*/
#ifndef SRC_CLOCK_H_
#define SRC_CLOCK_H_
struct time_t {
2018-11-22 17:15:49 +01:00
unsigned int diffHour;
unsigned int diffMinute;
unsigned int diffSecond;
unsigned int seconds;
2018-11-22 11:50:11 +01:00
};
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
2018-11-22 14:17:39 +01:00
struct time_t getTimeStamp(); // returns a timestamp
2018-11-22 11:50:11 +01:00
};
#endif /* SRC_CLOCK_H_ */