#include <agent_timer.h>
Inheritance diagram for NLAIAGENT::CAgentManagerTimer::CRunTimer:
Public Member Functions | |
CRunTimer () | |
virtual void | getName (std::string &result) const |
void | run () |
~CRunTimer () |
|
Definition at line 41 of file agent_timer.h.
00041 {} |
|
Definition at line 42 of file agent_timer.h.
00042 {} |
|
Reimplemented in NL3D::CAsyncFileManager3D::CMeshLoad, NL3D::CAsyncFileManager3D::CIGLoad, NL3D::CAsyncFileManager3D::CIGLoadUser, NL3D::CAsyncFileManager3D::CTextureLoad, NL3D::CZoneLoadingTask, NLPACS::CGlobalRetriever::CLrLoader, NLMISC::CAsyncFileManager::CFileLoad, NLMISC::CAsyncFileManager::CMultipleFileLoad, and NLMISC::CAsyncFileManager::CSignal. Definition at line 74 of file thread.h. Referenced by NLMISC::CTaskManager::run().
00075 {
00076 result = "NoName";
00077 }
|
|
Implements NLMISC::IRunnable. Definition at line 140 of file agent_timer.cpp. References NLMISC::CTime::getLocalTime(), NLMISC::nlSleep(), t, NLMISC::TTime, and uint.
00141 { 00142 00143 NLMISC::TTime start = NLMISC::CTime::getLocalTime(); 00144 NLMISC::TTime time; 00145 while(1) 00146 { 00147 NLMISC::TTime t= NLMISC::CTime::getLocalTime(); 00148 time = (t - start); 00149 if(time > (uint)CAgentManagerTimer::ClockTick) 00150 { 00151 start = NLMISC::CTime::getLocalTime(); 00152 NLMISC::CSynchronized<CAgentScript *>::CAccessor accessor(CAgentManagerTimer::TimerManager); 00153 accessor.value()->run(); 00154 } 00155 NLMISC::nlSleep((uint)(CAgentManagerTimer::ClockTick/2)); 00156 //NLMISC::nlSleep(CAgentManagerTimer::ClockTick); 00157 } 00158 } |