mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-06 09:58:23 +02:00
Delete ahoyTimer.h
This commit is contained in:
parent
7177d54d73
commit
8f49aae4f3
1 changed files with 0 additions and 27 deletions
|
@ -1,27 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// 2022 Ahoy, https://ahoydtu.de
|
|
||||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __AHOY_TIMER_H__
|
|
||||||
#define __AHOY_TIMER_H__
|
|
||||||
|
|
||||||
#include <Arduino.h>
|
|
||||||
|
|
||||||
namespace ah {
|
|
||||||
inline bool checkTicker(uint32_t *ticker, uint32_t interval) {
|
|
||||||
uint32_t mil = millis();
|
|
||||||
if(mil >= *ticker) {
|
|
||||||
*ticker = mil + interval;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if((mil + interval) < (*ticker)) {
|
|
||||||
*ticker = mil + interval;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /*__AHOY_TIMER_H__*/
|
|
Loading…
Add table
Add a link
Reference in a new issue