From dc5912187a2185a04122225cb6f512db75d6672a Mon Sep 17 00:00:00 2001 From: Klagarge Date: Sun, 1 Oct 2023 17:52:02 +0200 Subject: [PATCH] finish timeout implementation --- src/simplified/xf/core/timeout.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/simplified/xf/core/timeout.cpp b/src/simplified/xf/core/timeout.cpp index 0e9e906..2f2202f 100644 --- a/src/simplified/xf/core/timeout.cpp +++ b/src/simplified/xf/core/timeout.cpp @@ -1,9 +1,17 @@ #include "xf/timeout.h" -// TODO: Implement code for XFTimeout class +// TODO done: Implement code for XFTimeout class XFTimeout::XFTimeout(int id, int interval, interface::XFBehavior *pBehavior): XFEvent(XFEventType::Timeout, id), interval_(interval) { - - +} + +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; }