FileDocCategorySizeDatePackage
MonkeyThrottleEvent.javaAPI DocAndroid 1.5 API1568Wed May 06 22:41:08 BST 2009com.android.commands.monkey

MonkeyThrottleEvent

public class MonkeyThrottleEvent extends MonkeyEvent
monkey throttle event

Fields Summary
private long
mThrottle
Constructors Summary
public MonkeyThrottleEvent(int type, long throttle)

        super(type);
        mThrottle = throttle;
    
Methods Summary
public intinjectEvent(android.view.IWindowManager iwm, android.app.IActivityManager iam, int verbose)


        if (verbose > 1) {
            System.out.println("Sleeping for " + mThrottle + " milliseconds");
        }
        try {
            Thread.sleep(mThrottle);
        } catch (InterruptedException e1) {
            System.out.println("** Monkey interrupted in sleep.");
            return MonkeyEvent.INJECT_FAIL;
        }
        
        return MonkeyEvent.INJECT_SUCCESS;