Hey, all... my brain is not working very well for Java today, I'm thinking in two other languages and a bunch of other stuff is rattling around my skull.
Basically, I want to build a timer, A, that will trigger a timer, B.
While timer B is active, A is not active; while A is active, B is not active. Timer A has a long cycle time, B has a short cycle time.
Pseudocode:
WHILE-->Engine is running
IF Timer B condition == FALSE, Advance Timer A, do not advance Timer B
IF Timer A interval has elapsed, trigger Timer B condition to TRUE
IF Timer B has not elapsed and timer A is not active, Do Stuff...
WHEN Timer B elapses, Timer B condition = FALSE
Does that make sense? This is a concept I want to use for various randomized behaviors where the cycle-time of B is pretty constant or isn't even using a timer at all, in the SS sense (strict frame-counting, rather, to ensure complete operational cycles even if framerate drops) but where A is going to be random.