Team2122 / RoTator

The potato that spins
4 stars 0 forks source link

Timer class which uses ITimeProvider #87

Closed amikhalev closed 7 years ago

amikhalev commented 7 years ago

Should have methods:

void start(); // sets the start time
double restart(); // resets the start time and gets the current delta
double getPeriod();
void reset(); // resets the start time to 0 or negative infinity, so any time out is guaranteed to finish
boolean hasPeriodElapsed(double);
riftEmber commented 7 years ago

I think getPeriod should be called get, like in WPILib

riftEmber commented 7 years ago

Also hasPeriodElapsed will reset the timer if the period has passed btw

riftEmber commented 7 years ago

Where should it go?

amikhalev commented 7 years ago

control