You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
233 B
C
8 lines
233 B
C
5 years ago
|
#ifndef TOOLS_H
|
||
|
#define TOOLS_H
|
||
|
|
||
|
#define EVERY_N_SECONDS(t) for (static uint16_t _lasttime; \
|
||
|
(uint16_t)((uint16_t)millis() - _lasttime) >= (t * 1000); \
|
||
|
_lasttime += (t * 1000))
|
||
|
|
||
|
#endif
|