Files
hexapod-robot/2012-simulation/processing-3d/hexapod/CustomTimer.pde
T
mangavalk 972ba2cb73 Add CustomTimer and separate left/right leg handling
Imported from the unarchived 'hexapod' sketch folder. The real date of this
version is unknown; file dates were lost in a 2016-11-14 copy.
2016-11-14 13:07:00 +01:00

20 lines
280 B
Plaintext

class CustomTimer
{
int time;
boolean start=true;
public boolean delay(int delay)
{
if (start)
{
time = millis();
start = false;
}
if (millis() - time >= delay)
{
start = true;
return true;
} else
return false;
}
}