You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Better to add timeout/interval to the Instruction class instead of ConditionWatcher? #4
Sounds not bad I think.
Usually I created wrapping code around my ConditionWatcher's waitForCondition method. It resulted in even 15+ variations of something like this:
public void waitForCondition(String key, int waitTimeInMs, int interval, Bundle data) throws Exception {
Instruction instruction = InstructionStore.getInstructionForKey(key);
instruction.setData(data);
ConditionWatcher.setTimeoutLimit(waitTimeInMs);
ConditionWatcher.setWatchInterval(interval);
ConditionWatcher.waitForCondition(instruction);
ConditionWatcher.setWatchInterval(ConditionWatcher.DEFAULT_INTERVAL);
}
Your idea could reduce it so I think it's a good direction. Go ahead with PR, I will be happy to check and merge it :)
Activity
polok commentedon Jul 26, 2017
You have 👍 from me :)
FisherKK commentedon Jul 26, 2017
Hey @hkmushtaq
Sounds not bad I think.
Usually I created wrapping code around my ConditionWatcher's waitForCondition method. It resulted in even 15+ variations of something like this:
Your idea could reduce it so I think it's a good direction. Go ahead with PR, I will be happy to check and merge it :)
hkmushtaq commentedon Jul 26, 2017
Awesome, I'll get to work on refactoring it!