diff options
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/eventq.hh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh index 974313968..6fbba46d5 100644 --- a/src/sim/eventq.hh +++ b/src/sim/eventq.hh @@ -293,13 +293,25 @@ class EventWrapper : public Event T *object; public: - EventWrapper(T *obj, bool del = false, EventQueue *q = &mainEventQueue, + EventWrapper(T *obj, bool del = false, + EventQueue *q = &mainEventQueue, Priority p = Default_Pri) : Event(q, p), object(obj) { if (del) setFlags(AutoDelete); } + + EventWrapper(T *obj, Tick t, bool del = false, + EventQueue *q = &mainEventQueue, + Priority p = Default_Pri) + : Event(q, p), object(obj) + { + if (del) + setFlags(AutoDelete); + schedule(t); + } + void process() { (object->*F)(); } }; |