RBE1001Lib
Timer.h
Go to the documentation of this file.
1 #pragma once
2 
11 class Timer
12 {
13 public:
19  Timer(unsigned long interval);
26  bool isExpired();
31  void reset();
37  void reset(unsigned long newInterval);
38 
39 private:
40  unsigned long expiredTime;
41  unsigned long timeInterval;
42 };
bool isExpired()
Checks to see if the timer has expired.
Definition: Timer.cpp:35
void reset()
Reset the timer to the current time + interval.
Definition: Timer.cpp:16
Timer(unsigned long interval)
Construct a new Timer object.
Definition: Timer.cpp:7
unsigned long expiredTime
Definition: Timer.h:40
unsigned long timeInterval
Definition: Timer.h:41
A Timer that remembers a starting time and interval allow easy periodic events.
Definition: Timer.h:11