Files
hexapod-robot/2016-ssc32-processing-port/Hexapod_NEW/CustomTimer.h
T
mangavalk be287b066e Give the 2014, 2016 and 2019 robot sketches their own sketch folder
The Arduino IDE needs the folder name to match the .ino: HexapodRobot/, Hexapod_NEW/ and Hexapod_Teensy/. References in 2026-current/CLAUDE.md updated.
2026-10-25 17:31:44 +01:00

34 lines
401 B
C++

// 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