41 RtcTime(
int year,
int month,
int day,
int hour = 0,
int minute = 0,
int second = 0,
long nsec = 0);
42 RtcTime(
const char* date,
const char* time);
48 long nsec()
const {
return _nsec; }
49 int year()
const {
return _year; }
50 int month()
const {
return _month; }
51 int day()
const {
return _day; }
52 int hour()
const {
return _hour; }
53 int minute()
const {
return _minute; }
54 int second()
const {
return _second; }
62 void month(
int month);
65 void minute(
int minute);
66 void second(
int second);
72 return (_sec == other._sec);
75 bool operator != (
const RtcTime& other)
const {
76 return !(*
this == other);
79 void operator += (uint32_t seconds) {
84 void operator -= (uint32_t seconds) {
89 operator uint32_t()
const {
102 void update(
int year,
int month,
int day,
int hour,
int minute,
int second);
RTC time definitions.
Definition: RtcTime.h:35
void unixtime(uint32_t sec)
Setter APIs of RtcTime.
RtcTime(uint32_t sec=0, long nsec=0)
Create RtcTime object.
bool operator==(const RtcTime &other) const
operator APIs to compare and calculate with RtcTime
Definition: RtcTime.h:71
uint32_t unixtime() const
Getter APIs of RtcTime.
Definition: RtcTime.h:47