-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathitimer.h
More file actions
39 lines (34 loc) · 969 Bytes
/
itimer.h
File metadata and controls
39 lines (34 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* @brief Declares interface for gardening sequencing timer.
*/
#ifndef I_TIMER_H
#define I_TIMER_H
#include "istatemachine.h"
namespace gardener
{
/**
* @brief Gardener sequencing timer interface.
*/
class ITimer
{
public:
/**
* @brief Reloads the timer.
*
* @param [in] newTime New timer value to reload in ms.
*
* @note Call @ref isExpired to check if @p newTime has
* elapsed.
*/
virtual void reload(const int newTime) = 0;
/**
* @brief Checks if the timer has expired.
*
* @returns true if time reloaded in @ref reload has elapsed;
* or false if timer has not been loaded or time has not
* elapsed.
*/
virtual bool isExpired(void) = 0;
};
}
#endif /* I_TIMER_H */