NLAIAGENT::CAgentManagerTimer::CRunTimer Class Reference

#include <agent_timer.h>

Inheritance diagram for NLAIAGENT::CAgentManagerTimer::CRunTimer:

NLMISC::IRunnable

Public Member Functions

 CRunTimer ()
virtual void getName (std::string &result) const
void run ()
 ~CRunTimer ()

Constructor & Destructor Documentation

NLAIAGENT::CAgentManagerTimer::CRunTimer::CRunTimer  )  [inline]
 

Definition at line 41 of file agent_timer.h.

00041 {}

NLAIAGENT::CAgentManagerTimer::CRunTimer::~CRunTimer  )  [inline]
 

Definition at line 42 of file agent_timer.h.

00042 {}


Member Function Documentation

virtual void NLMISC::IRunnable::getName std::string &  result  )  const [inline, virtual, inherited]
 

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         }

void NLAIAGENT::CAgentManagerTimer::CRunTimer::run  )  [virtual]
 

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         }


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 09:01:12 2004 for NeL by doxygen 1.3.6