HomeWaterLeaksDetection
TimePeriod.h
Go to the documentation of this file.
1
#ifndef TIME_PERIOD_H
2
#define TIME_PERIOD_H
3
4
#include "Arduino.h"
5
#include "
DateTime.h
"
6
7
//==================TimePeriod class====================
8
14
class
TimePeriod
{
15
16
//====================private data======================
17
private
:
18
time_t
period
;
19
time_t
lastActive
;
20
21
//==================public methods======================
22
public
:
25
TimePeriod
(
time_t
period
);
26
29
int
isActive
();
30
};
31
32
#endif
DateTime.h
TimePeriod::isActive
int isActive()
Returns information if the period of time has passed.
Definition:
TimePeriod.cpp:7
TimePeriod::period
time_t period
the period of tme, e.g. 2s
Definition:
TimePeriod.h:18
time_t
unsigned long time_t
Referring to the data type unsigned long as time_t.
Definition:
DateTime.h:20
TimePeriod
Definition:
TimePeriod.h:14
TimePeriod::TimePeriod
TimePeriod(time_t period)
Constructor of the class.
Definition:
TimePeriod.cpp:3
TimePeriod::lastActive
time_t lastActive
last time stamp from which the period of time is being measured
Definition:
TimePeriod.h:19
include
TimePeriod.h
Generated on Thu May 13 2021 08:42:38 for HomeWaterLeaksDetection by
1.8.18