stand by mode dev

fukurou

the supreme coder
ADMIN
Python:
class AXStandBy:
    def __init__(self, pause: int):
        self._tg:TimeGate = TimeGate(pause)

    def standBy(self, ear: str) -> bool:
        # only returns true after pause minutes of no input
        if len(ear) > 0:
            # restart count
            self._tg.openForPauseMinutes()
            return False
        if self._tg.isClosed():
            # time out without input, stand by is true
            self._tg.openForPauseMinutes()
            return True

feeling lethargic. going to sleep. fuck you lurker cunts
 

fukurou

the supreme coder
ADMIN
Python:
class AXStandBy:
    def __init__(self, pause: int):
        self._tg:TimeGate = TimeGate(pause)
        self._tg.openForPauseMinutes()

    def standBy(self, ear: str) -> bool:
        # only returns true after pause minutes of no input
        if len(ear) > 0:
            # restart count
            self._tg.openForPauseMinutes()
            return False
        if self._tg.isClosed():
            # time out without input, stand by is true
            self._tg.openForPauseMinutes()
            return True
 

fukurou

the supreme coder
ADMIN
Java:
public class AXStandBy {
    private final TimeGate tg;

    public AXStandBy(int pause) {
        this.tg = new TimeGate(pause);
        this.tg.openGate();
    }

    public boolean standBy(String ear) {
        // only returns true after pause minutes of no input
        if (ear.length() > 0) {
            // restart count
            this.tg.openGate();
            return false;
        }
        if (this.tg.isClosed()) {
            // time out without input, stand by is true
            this.tg.openGate();
            return true;
        }
        return false;
    }
}
 

fukurou

the supreme coder
ADMIN
Kotlin:
class AXStandBy(pause: Int) {
    private val tg: TimeGate = TimeGate(pause)

    init {
        tg.openGate()
    }

    fun standBy(ear: String): Boolean {
        // only returns true after pause minutes of no input
        if (ear.isNotEmpty()) {
            // restart count
            tg.openGate()
            return false
        }
        if (tg.isClosed) {
            // time out without input, stand by is true
            tg.openGate()
            return true
        }
        return false
    }
}
 
Top