Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

vpr::sim::Clock Class Reference

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

#include <Clock.h>

Collaboration diagram for vpr::sim::Clock:

Collaboration graph
[legend]
List of all members.

Public Methods

 Clock (void)
const vpr::IntervalgetCurrentTime (void) 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 62 of file Clock.h.


Constructor & Destructor Documentation

vpr::sim::Clock::Clock void    [inline]
 

Definition at line 65 of file Clock.h.

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


Member Function Documentation

const vpr::Interval& vpr::sim::Clock::getCurrentTime void    const [inline]
 

Definition at line 71 of file Clock.h.

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

00072    {
00073       return mCurrentTime;
00074    }

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

Definition at line 76 of file Clock.h.

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

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


The documentation for this class was generated from the following file:
Generated on Sun May 2 14:47:18 2004 for VR Juggler Portable Runtime by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002