Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

base::Time Class Reference

Inheritance diagram for base::Time:

Inheritance graph
[legend]
Collaboration diagram for base::Time:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Time ()
 Time (const Time &t)
 Time (long secs, long micros)
 Time (Real secs)
virtual ~Time ()
virtual String className () const
bool isPast () const
Timeoperator= (const Time &t)
bool operator== (const Time &t) const
Timeoperator-= (const Time &t)
Timeoperator+= (const Time &t)
Timeoperator *= (Real s)
Timeoperator/= (Real s)
Real seconds () const
bool equals (const Time &t, Time eps=Time(0, 10))
void serialize (Serializer &s)
 read or write object state to Serializer

virtual bool isSameKindAs (const Object &) const

Static Public Member Functions

const Timenow ()
bool isPast (const Time &t)
bool less (const Time &t1, const Time &t2)
bool greater (const Time &t1, const Time &t2)
void sleep (const Time &t)
void sleep (long secs, long micros)
void sleep (Real secs)
long timeResolution ()

Public Attributes

long secs
long micros

Static Public Attributes

const long microsPerSec = 1000000

Protected Member Functions

void normalize ()

Static Protected Member Functions

bool equal (const Time &t1, const Time &t2)

Static Protected Attributes

Timetime
long baseSecs
long baseMicros
Time lastNow
long resolution

Constructor & Destructor Documentation

base::Time::Time  ) 
 

Referenced by sleep().

base::Time::Time const Time t  )  [inline]
 

Definition at line 40 of file Time.

References micros, and secs.

base::Time::Time long  secs,
long  micros
[inline]
 

Definition at line 41 of file Time.

base::Time::Time Real  secs  ) 
 

virtual base::Time::~Time  )  [virtual]
 


Member Function Documentation

virtual String base::Time::className  )  const [inline, virtual]
 

return the name of the object's class type. Must be defined by derived classes.

Implements base::Object.

Definition at line 45 of file Time.

References base::String.

bool base::Time::equal const Time t1,
const Time t2
[inline, static, protected]
 

Definition at line 85 of file Time.

References micros, and secs.

Referenced by operator==().

bool base::Time::equals const Time t,
Time  eps = Time(0, 10)
[inline]
 

Definition at line 107 of file Time.

bool base::Time::greater const Time t1,
const Time t2
[static]
 

bool base::Time::isPast const Time t  )  [inline, static]
 

Definition at line 60 of file Time.

References less(), and now().

bool base::Time::isPast  )  const [inline]
 

Definition at line 47 of file Time.

References less(), and now().

virtual bool base::Object::isSameKindAs const Object  )  const [inline, virtual, inherited]
 

Definition at line 47 of file Object.

bool base::Time::less const Time t1,
const Time t2
[static]
 

Referenced by isPast().

void base::Time::normalize  )  [protected]
 

const Time& base::Time::now  )  [static]
 

Referenced by isPast().

Time& base::Time::operator *= Real  s  ) 
 

Referenced by operator/=().

Time& base::Time::operator+= const Time t  ) 
 

Time& base::Time::operator-= const Time t  ) 
 

Time& base::Time::operator/= Real  s  )  [inline]
 

Definition at line 54 of file Time.

References operator *=(), and base::Real.

Time& base::Time::operator= const Time t  )  [inline]
 

Definition at line 49 of file Time.

References micros, and secs.

bool base::Time::operator== const Time t  )  const [inline]
 

Definition at line 50 of file Time.

References equal().

Real base::Time::seconds  )  const [inline]
 

Definition at line 56 of file Time.

References micros, microsPerSec, base::Real, and secs.

void base::Time::serialize Serializer s  ) 
 

read or write object state to Serializer

Referenced by base::Serializer::operator()().

void base::Time::sleep Real  secs  )  [inline, static]
 

Definition at line 69 of file Time.

References base::Real, sleep(), and Time().

void base::Time::sleep long  secs,
long  micros
[static]
 

void base::Time::sleep const Time t  )  [static]
 

Referenced by sleep().

long base::Time::timeResolution  )  [inline, static]
 

Definition at line 71 of file Time.

References resolution.


Member Data Documentation

long base::Time::baseMicros [static, protected]
 

Definition at line 81 of file Time.

long base::Time::baseSecs [static, protected]
 

Definition at line 80 of file Time.

Time base::Time::lastNow [static, protected]
 

Definition at line 82 of file Time.

long base::Time::micros
 

Definition at line 75 of file Time.

Referenced by equal(), base::operator<<(), operator=(), seconds(), and Time().

const long base::Time::microsPerSec = 1000000 [static]
 

Definition at line 58 of file Time.

Referenced by seconds().

long base::Time::resolution [static, protected]
 

Definition at line 83 of file Time.

Referenced by timeResolution().

long base::Time::secs
 

Definition at line 75 of file Time.

Referenced by equal(), base::operator<<(), operator=(), seconds(), and Time().

Time* base::Time::time [static, protected]
 

Definition at line 78 of file Time.


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:39:24 2004 for OpenSim by doxygen 1.3.6