Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ketoo committed Apr 2, 2020
1 parent cfbf0c3 commit 7deae50
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
34 changes: 1 addition & 33 deletions NFComm/NFKernelPlugin/NFScheduleModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,32 +56,6 @@ bool NFScheduleModule::Init()

m_pKernelModule->RegisterCommonClassEvent(this, &NFScheduleModule::OnClassCommonEvent);

/*
for (int i = 0; i < 10; ++i)
{
auto scheduleObject = NF_SHARE_PTR<NFScheduleElement>(NF_NEW NFScheduleElement());
scheduleObject->mstrScheduleName = std::to_string(i);
scheduleObject->mfIntervalTime = m_pKernelModule->Random();
scheduleObject->mnTriggerTime = NFGetTimeMS() + (NFINT64)(scheduleObject->mfIntervalTime * 1000);
scheduleObject->mnStartTime = NFGetTimeMS();
scheduleObject->mnRemainCount = 1;
scheduleObject->mnAllCount = 1;
scheduleObject->self = NFGUID(1, i);
TickElement tickElement;
tickElement.scheduleName = std::to_string(i);
tickElement.intervalTime = 5.0f;
tickElement.remainCount = 15;
tickElement.triggerTime = NFGetTimeMS() + (NFINT64)(scheduleObject->mfIntervalTime * 1000);
mScheduleMap.insert(tickElement);
}
for (auto it = mScheduleMap.begin(); it != mScheduleMap.end(); ++it)
{
std::cout << it->scheduleName << " " << it->triggerTime << std::endl;
}
*/
//NFIScheduleModule::AddSchedule(NFGUID(), "test", this, &NFScheduleModule::ScheduleFunction, 5.0f, 3);
return true;
}

Expand Down Expand Up @@ -225,10 +199,4 @@ int NFScheduleModule::OnClassCommonEvent(const NFGUID & self, const std::string
}

return 0;
}

int NFScheduleModule::ScheduleFunction(const NFGUID &self, const std::string &name, const float time, const int count)
{
std::cout << name << " -------------------------------time:" << time << " count:" << count << std::endl;
return 0;
}
}
1 change: 0 additions & 1 deletion NFComm/NFKernelPlugin/NFScheduleModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class NFScheduleModule : public NFIScheduleModule

protected:
int OnClassCommonEvent(const NFGUID & self, const std::string & strClassName, const CLASS_OBJECT_EVENT eClassEvent, const NFDataList & var);
int ScheduleFunction(const NFGUID& self, const std::string& name, const float time, const int count);

protected:
NFMapEx<NFGUID, NFMapEx<std::string, NFScheduleElement >> mObjectScheduleMap;
Expand Down

0 comments on commit 7deae50

Please sign in to comment.