Metro.h 357 B

1234567891011121314151617181920212223242526
  1. #ifndef Metro_h
  2. #define Metro_h
  3. #include <inttypes.h>
  4. class Metro
  5. {
  6. public:
  7. Metro(unsigned long interval_millis);
  8. Metro(unsigned long interval_millis, uint8_t autoreset);
  9. void interval(unsigned long interval_millis);
  10. char check();
  11. void reset();
  12. private:
  13. uint8_t autoreset;
  14. unsigned long previous_millis, interval_millis;
  15. };
  16. #endif