vpr::sim::Clock Class Reference

Simulated clock for use with the socket simulation code. More...

#include <vpr/md/SIM/Clock.h>

Collaboration diagram for vpr::sim::Clock:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Clock ()
const vpr::IntervalgetCurrentTime () const
void setCurrentTime (const vpr::Interval &time)

Detailed Description

Simulated clock for use with the socket simulation code.

The basic unit of time is tens of microseconds since that is what vpr::Interval uses.

Definition at line 63 of file Clock.h.


Constructor & Destructor Documentation

vpr::sim::Clock::Clock (  )  [inline]

Definition at line 66 of file Clock.h.

00067       : mCurrentTime(0, vpr::Interval::Base)
00068    {
00069       /* Do nothing. */ ;
00070    }


Member Function Documentation

const vpr::Interval& vpr::sim::Clock::getCurrentTime (  )  const [inline]

Definition at line 72 of file Clock.h.

Referenced by vpr::SocketStreamImplSIM::accept(), vpr::sim::Controller::processEvents(), vpr::sim::Controller::processNextEvent(), and vpr::sim::SocketManager::sendMessage().

00073    {
00074       return mCurrentTime;
00075    }

void vpr::sim::Clock::setCurrentTime ( const vpr::Interval time  )  [inline]

Definition at line 77 of file Clock.h.

Referenced by vpr::sim::Controller::processEvents(), and vpr::sim::Controller::processNextEvent().

00078    {
00079       if ( time > mCurrentTime )
00080       {
00081          mCurrentTime = time;
00082       }
00083    }


The documentation for this class was generated from the following file:
Generated on Thu Jan 4 10:56:09 2007 for VR Juggler Portable Runtime by  doxygen 1.5.1