// Path: src/com/thoughtworks/calabash/android/CalabashLogger.java
// public static void info(Object message) {
//     if (shouldLog && isNotEmpty(message)) {
//         log.info(message);
//     }
// }


import static com.thoughtworks.calabash.android.CalabashLogger.info;
import static java.lang.String.format;
package com.thoughtworks.calabash.android;


public class ConditionalWaiter {
    private final ICondition condition;

    public ConditionalWaiter(ICondition condition) {
        this.condition = condition;
    }

    public void run(int times, int sleepTimeInSec) throws CalabashException {
        int timesTested = 0;
        int sleepTimeInMilli = sleepTimeInSec * 1000;
        while (!condition.test() && timesTested <= times) {
            try {
// Path: src/com/thoughtworks/calabash/android/CalabashLogger.java
// public static void info(Object message) {
//     if (shouldLog && isNotEmpty(message)) {
//         log.info(message);
//     }
// }


// Path: src/com/thoughtworks/calabash/android/ConditionalWaiter.java
import static com.thoughtworks.calabash.android.CalabashLogger.info;
import static java.lang.String.format;

package com.thoughtworks.calabash.android;


public class ConditionalWaiter {
    private final ICondition condition;

    public ConditionalWaiter(ICondition condition) {
        this.condition = condition;
    }

    public void run(int times, int sleepTimeInSec) throws CalabashException {
        int timesTested = 0;
        int sleepTimeInMilli = sleepTimeInSec * 1000;
        while (!condition.test() && timesTested <= times) {
            try {
                info("Retrying wait condition: " + condition.getDescription());