PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Metro.h 357B

3 years ago
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