Skip to content

Commit

Permalink
force fakeTimer for FakeTimeDev
Browse files Browse the repository at this point in the history
  • Loading branch information
ernstblechaPT committed Nov 4, 2024
1 parent 46caa30 commit 42eb910
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/stdfblib/ita/FakeTimeDev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
#endif
#include "stringdict.h"
#include "../arch/fake_time/faketimerha.h"
#include "../core/forteinstance.h"

#ifdef FORTE_FAKE_TIME
#include "arch/timerHandlerFactory.h"
#endif

const CStringDictionary::TStringId FakeTimeDev::scmDINameIds[] = { g_nStringIdMGR_ID, g_nStringIdFakeTime};
const CStringDictionary::TStringId FakeTimeDev::scmDIDataTypeIds[] = {g_nStringIdWSTRING, g_nStringIdTIME};
Expand All @@ -42,6 +47,10 @@ FakeTimeDev::FakeTimeDev(const std::string &paMGR_ID) :
}

bool FakeTimeDev::initialize() {
if(TimerHandlerFactory::getTImerHandlerName() != TimerHandlerFactory::AvailableTimers::fakeTimer) {
TimerHandlerFactory::setTimeHandlerNameToCreate(TimerHandlerFactory::AvailableTimers::fakeTimer);
DEVLOG_INFO("FakeTimeDev: fakeTimer forced\n");
}
if(!CDevice::initialize()) {
return false;
}
Expand Down

0 comments on commit 42eb910

Please sign in to comment.