I think this should work... in my onTimerStart() method once an Activity is started. I could put this in onStart() instead so it does this even before the Activity starts?
What I think this should do is fire off my BG process immediately if the last time didn't exist or is more than 5 mins ago.
Since that is a MOMENT, that is a one time trigger. Then go ahead and also setup an EVERY FIVE MINS Duration event, regardless of if I have started an immediate event or not.
Any timing issues with this logic?
//////////////////////////
var lastTime = Background.getLastTemporalEventTime();