question: public boolean shouldExecuteAction ( ) { if ( delay <= 0 ) { return true ; } long timePassed = System . currentTimeMillis ( ) - lastActionExecuted ; if ( timePassed > delay * 100 ) { lastActionExecuted = System . currentTimeMillis ( ) ; return true ; } return false ; }
target:  Checks whether an action should currently be executed, based on the required delay. Also assumes that an action was executed if this returns true and sets the time of the last action to the current time.