Skip to content

Commit b01337b

Browse files
committed
ClockEvent::execute(): Extended to switch the context component to the target module.
1 parent f720283 commit b01337b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/inet/clock/common/ClockEvent.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Register_Class(ClockEvent)
1616

1717
void ClockEvent::execute()
1818
{
19+
cSimpleModule *targetModule = check_and_cast<cSimpleModule *>(getTargetObject());
20+
cContextSwitcher contextSwitcher(targetModule);
1921
if (clock != nullptr) {
2022
clocktime_t clockTime = clock->getClockTime();
2123
EV_DEBUG << "Executing clock event" << EV_FIELD(clockTime) << EV_FIELD(event, this) << EV_ENDL;

0 commit comments

Comments
 (0)