#include "xf/timeout.h"

XFTimeout::XFTimeout(int id, int interval, interface::XFBehavior *pBehavior):
    XFEvent(XFEventType::Timeout, id), interval_(interval) {
    this->setRelTicks(this->getInterval());
    setBehavior(pBehavior);
}

bool XFTimeout::operator ==(const XFTimeout &timeout) const {
    bool i = (id_ == timeout.id_);
    bool b = (pBehavior_ == timeout.pBehavior_);
    return (i && b);
}

bool XFTimeout::deleteAfterConsume() const {
    return true;
}
