update
This commit is contained in:
1 parent
bc13cdbbbe
commit
3e28a0aec6
13 files changed
+1473
No files matched your search
@@ -0,0 +1,33 @@
|
||||
// Version 1
|
||||
|
||||
#ifndef CustomTimer_H
|
||||
#define CustomTimer_H
|
||||
|
||||
class CustomTimer
|
||||
{
|
||||
int time;
|
||||
boolean start;
|
||||
public: CustomTimer()
|
||||
{
|
||||
start=false;
|
||||
}
|
||||
public: boolean Delay(int delay)
|
||||
{
|
||||
if (!start)
|
||||
{
|
||||
time = millis();
|
||||
start = true;
|
||||
}
|
||||
if (millis() - time >= delay)
|
||||
{
|
||||
start = false;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user