Package frc.team_8840_lib.info.time
Class TimeKeeper
java.lang.Object
frc.team_8840_lib.info.time.TimeKeeper
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidchangePhaseTimers(GamePhase phase) voidcheckSubscribers(GamePhase currentPhase) voidcreateTimer(String name) doublestatic TimeKeeperdoubledoublegetPhaseTime(GamePhase phase) doubledoublestatic voidinit()voidresetAndStartTimer(String name) voidvoidresetTimer(String name) voidresubscribe(String key) voidresubscribeAll(String timer) voidstartTimer(String name) voidsubscribe(String key, String timer, double startTime, double endTime, SubscriptionType type, Callback callback) subscribe(String key, String timer, double startTime, double endTime, SubscriptionType type, Callback callback, Callback onceFinished) subscribe(String key, String timer, double time, SubscriptionType type, Callback callback) subscribe(String key, String timer, double time, SubscriptionType type, Callback callback, Callback onceFinished) time()voidunsubscribe(String key)
-
Field Details
-
automaticallyResubscribeEvents
public boolean automaticallyResubscribeEvents
-
-
Method Details
-
getInstance
-
init
public static void init() -
resetGameTimers
public void resetGameTimers() -
createTimer
-
resetTimer
-
startTimer
-
resetAndStartTimer
-
stopTimer
-
get
-
time
-
getRealTime
public double getRealTime() -
getRealTimeStr
-
getRobotTime
public double getRobotTime() -
getPhaseTime
-
getPhaseTime
public double getPhaseTime() -
changePhaseTimers
-
subscribe
public TimeKeeper subscribe(String key, String timer, double time, SubscriptionType type, Callback callback) -
subscribe
public TimeKeeper subscribe(String key, String timer, double time, SubscriptionType type, Callback callback, Callback onceFinished) -
subscribe
public TimeKeeper subscribe(String key, String timer, double startTime, double endTime, SubscriptionType type, Callback callback) -
subscribe
public TimeKeeper subscribe(String key, String timer, double startTime, double endTime, SubscriptionType type, Callback callback, Callback onceFinished) -
checkSubscribers
-
unsubscribe
-
resubscribe
-
resubscribeAll
-