Time
[Baselib]

A group of basic classes dealing with time. More...

Namespaces

namespace  MipBaselib

Classes

class  MipBaselib::SimTimer
 timer class, a timer More...
class  MipBaselib::Timer
 timer class, a timer More...
class  MipBaselib::TimeUtilities
 some Time utilities gathered in a class More...

Functions

 MipBaselib::SimTime::SimTime ()
 Default constructor (set the simulation time to real time).
 MipBaselib::SimTime::SimTime (long int s, long int u)
 MipBaselib::SimTime::SimTime (Decimal t)
 Decimal constructor.
 MipBaselib::SimTime::SimTime (const SimTime &t)
 copy constructor
 MipBaselib::SimTime::SimTime (const Time &t)
 Time constructor.
 MipBaselib::SimTime::SimTime (stringstream &ss)
 string constructor
void MipBaselib::SimTime::setSimulatedTime (Time t)
 Sets the time of the simulation.
void MipBaselib::SimTime::setRealTime ()
 Sets the time of the simulation as the .
 MipBaselib::SimTimer::SimTimer (Time alreadyElapsed)
 Long int constructor: starts the timer at the current instant, storing the elapsed time passed as argument.
 MipBaselib::SimTimer::SimTimer (const SimTimer &t)
 Copy constructor.
SimTimer & MipBaselib::SimTimer::operator= (const SimTimer &t)
 Assigment operator =.
void MipBaselib::SimTimer::reset ()
 Restarts the timer at the current instant.
void MipBaselib::SimTimer::pause ()
 Pauses the timer. It is considered only if is NOT in _pause, It pauses the timer storing the current elapsed time.
void MipBaselib::SimTimer::resume ()
 Continue: it is considered only if is in _pause, continues to take the time.
Time MipBaselib::SimTimer::get ()
 Gets the current value of the timer.
string MipBaselib::SimTimer::print ()
 Prints the current value of the timer.
Decimal MipBaselib::SimTimer::freq ()
 Computes the frequency.
string MipBaselib::SimTimer::printFreq ()
 Prints the current frequency of the timer.
 MipBaselib::Time::Time ()
 default constructor
 MipBaselib::Time::Time (long int s, long int u)
 long int constructor
 MipBaselib::Time::Time (Decimal t)
 Decimal constructor.
 MipBaselib::Time::Time (const Time &t)
 copy constructor
 MipBaselib::Time::Time (stringstream &ss)
 string constructor
Time & MipBaselib::Time::operator= (const Time &t)
 assigment operator =
Time & MipBaselib::Time::operator+= (const Time &t)
 compound assignment operator +=
Time & MipBaselib::Time::operator-= (const Time &t)
 compound assignment operator -=
Time MipBaselib::Time::operator+ (const Time &other) const
 binary arithmetic operator +
Time MipBaselib::Time::operator- (const Time &other) const
 binary arithmetic operator -
Time & MipBaselib::Time::operator*= (Decimal scalar)
 compound assignment operator *
Time & MipBaselib::Time::operator* (Decimal scalar)
 compound assignment operator *
bool MipBaselib::Time::operator== (const Time &other) const
 compound operator ==
bool MipBaselib::Time::operator!= (const Time &other) const
 compound operator !=
bool MipBaselib::Time::operator> (const Time &other) const
 greater than operator >
bool MipBaselib::Time::operator< (const Time &other) const
 less than operator >
bool MipBaselib::Time::operator>= (const Time &other) const
 geq operator >
bool MipBaselib::Time::operator<= (const Time &other) const
 leq operator >
long int MipBaselib::Time::sec () const
 Gets the seconds.
long int MipBaselib::Time::usec () const
 Gets the microseconds.
void MipBaselib::Time::setTime (const Decimal &t)
 Set Time.
void MipBaselib::Time::setTime (const long int &insec, const long int &inusec)
 Set Time.
void MipBaselib::Time::setTime (const Time &time)
 Set Time.
Decimal MipBaselib::Time::dCast ()
 decimal cast of Time (in secs)
Decimal MipBaselib::Time::freq ()
 frequency
string MipBaselib::Time::print ()
 print
string MipBaselib::Time::printFreq ()
 print the frequency
string MipBaselib::Time::printDCast ()
string MipBaselib::Time::dateTime ()
string MipBaselib::Time::exportAsString () const
 MipBaselib::Timer::Timer (Time alreadyElapsed)
 Long int constructor: starts the timer at the current instant, storing the elapsed time passed as argument.
 MipBaselib::Timer::Timer (const Timer &t)
 Copy constructor.
Timer & MipBaselib::Timer::operator= (const Timer &t)
 Assigment operator =.
void MipBaselib::Timer::reset ()
 Restarts the timer at the current instant.
void MipBaselib::Timer::pause ()
 Pauses the timer. It is considered only if is NOT in _pause, It pauses the timer storing the current elapsed time.
void MipBaselib::Timer::resume ()
 Continue: it is considered only if is in _pause, continues to take the time.
Time MipBaselib::Timer::get ()
 Gets the current value of the timer.
string MipBaselib::Timer::print ()
 Prints the current value of the timer.
Decimal MipBaselib::Timer::freq ()
 Computes the frequency.
string MipBaselib::Timer::printFreq ()
 Prints the current frequency of the timer.

Variables

long int MipBaselib::Time::_usec
static const int MipBaselib::Time::TIME_RESOLUTION = 1000000

Detailed Description

A group of basic classes dealing with time.

basic set of classes about time


Function Documentation

string MipBaselib::Time::dateTime (  )  [inherited]

Decimal MipBaselib::Time::dCast (  )  [inherited]

decimal cast of Time (in secs)

string MipBaselib::Time::exportAsString (  )  const [inherited]

Decimal MipBaselib::Timer::freq (  )  [inherited]

Computes the frequency.

Decimal MipBaselib::Time::freq (  )  [inherited]

frequency

Decimal MipBaselib::SimTimer::freq (  )  [inherited]

Computes the frequency.

Time MipBaselib::Timer::get (  )  [inherited]

Gets the current value of the timer.

Returns:
time elapsed
Examples:
exampleThread.cpp.

Time MipBaselib::SimTimer::get (  )  [inherited]

Gets the current value of the timer.

Returns:
time elapsed

bool MipBaselib::Time::operator!= ( const Time other  )  const [inherited]

compound operator !=

Time & MipBaselib::Time::operator* ( Decimal  scalar  )  [inherited]

compound assignment operator *

Time & MipBaselib::Time::operator*= ( Decimal  scalar  )  [inherited]

compound assignment operator *

Time MipBaselib::Time::operator+ ( const Time other  )  const [inherited]

binary arithmetic operator +

Time & MipBaselib::Time::operator+= ( const Time t  )  [inherited]

compound assignment operator +=

Time MipBaselib::Time::operator- ( const Time other  )  const [inherited]

binary arithmetic operator -

Time & MipBaselib::Time::operator-= ( const Time t  )  [inherited]

compound assignment operator -=

bool MipBaselib::Time::operator< ( const Time other  )  const [inherited]

less than operator >

bool MipBaselib::Time::operator<= ( const Time other  )  const [inherited]

leq operator >

Timer & MipBaselib::Timer::operator= ( const Timer t  )  [inherited]

Assigment operator =.

Time & MipBaselib::Time::operator= ( const Time t  )  [inherited]

assigment operator =

SimTimer & MipBaselib::SimTimer::operator= ( const SimTimer t  )  [inherited]

Assigment operator =.

bool MipBaselib::Time::operator== ( const Time other  )  const [inherited]

compound operator ==

bool MipBaselib::Time::operator> ( const Time other  )  const [inherited]

greater than operator >

bool MipBaselib::Time::operator>= ( const Time other  )  const [inherited]

geq operator >

void MipBaselib::Timer::pause (  )  [inherited]

Pauses the timer. It is considered only if is NOT in _pause, It pauses the timer storing the current elapsed time.

void MipBaselib::SimTimer::pause (  )  [inherited]

Pauses the timer. It is considered only if is NOT in _pause, It pauses the timer storing the current elapsed time.

string MipBaselib::Timer::print (  )  [inherited]

Prints the current value of the timer.

string MipBaselib::Time::print (  )  [inherited]

print

string MipBaselib::SimTimer::print (  )  [inherited]

Prints the current value of the timer.

string MipBaselib::Time::printDCast (  )  [inherited]

string MipBaselib::Timer::printFreq (  )  [inherited]

Prints the current frequency of the timer.

string MipBaselib::Time::printFreq (  )  [inherited]

print the frequency

string MipBaselib::SimTimer::printFreq (  )  [inherited]

Prints the current frequency of the timer.

void MipBaselib::Timer::reset (  )  [inherited]

Restarts the timer at the current instant.

void MipBaselib::SimTimer::reset (  )  [inherited]

Restarts the timer at the current instant.

void MipBaselib::Timer::resume (  )  [inherited]

Continue: it is considered only if is in _pause, continues to take the time.

void MipBaselib::SimTimer::resume (  )  [inherited]

Continue: it is considered only if is in _pause, continues to take the time.

long int MipBaselib::Time::sec (  )  const [inherited]

Gets the seconds.

void MipBaselib::SimTime::setRealTime (  )  [inherited]

Sets the time of the simulation as the .

After performing this method, any SimTime will wrap the CPU time.

void MipBaselib::SimTime::setSimulatedTime ( Time  t  )  [inherited]

Sets the time of the simulation.

Parameters:
[in] t Actual time of the simulation. After setting the simulation time with this method, any SimTime instantiation will return the setted time.

void MipBaselib::Time::setTime ( const Time time  )  [inherited]

Set Time.

void MipBaselib::Time::setTime ( const long int &  insec,
const long int &  inusec 
) [inherited]

Set Time.

void MipBaselib::Time::setTime ( const Decimal t  )  [inherited]

Set Time.

MipBaselib::SimTime::SimTime ( stringstream &  ss  )  [inherited]

string constructor

MipBaselib::SimTime::SimTime ( const Time t  )  [inherited]

Time constructor.

MipBaselib::SimTime::SimTime ( const SimTime t  )  [inherited]

copy constructor

MipBaselib::SimTime::SimTime ( Decimal  t  )  [inherited]

Decimal constructor.

MipBaselib::SimTime::SimTime ( long int  s,
long int  u 
) [inherited]

MipBaselib::SimTime::SimTime (  )  [inherited]

Default constructor (set the simulation time to real time).

MipBaselib::SimTimer::SimTimer ( const SimTimer t  )  [inherited]

Copy constructor.

MipBaselib::SimTimer::SimTimer ( Time  alreadyElapsed  )  [inherited]

Long int constructor: starts the timer at the current instant, storing the elapsed time passed as argument.

MipBaselib::Time::Time ( stringstream &  ss  )  [inherited]

string constructor

MipBaselib::Time::Time ( const Time t  )  [inherited]

copy constructor

MipBaselib::Time::Time ( Decimal  t  )  [inherited]

Decimal constructor.

MipBaselib::Time::Time ( long int  s,
long int  u 
) [inherited]

long int constructor

MipBaselib::Time::Time (  )  [inherited]

default constructor

in how many parts is divided the second, 1000000 is usec

MipBaselib::Timer::Timer ( const Timer t  )  [inherited]

Copy constructor.

MipBaselib::Timer::Timer ( Time  alreadyElapsed  )  [inherited]

Long int constructor: starts the timer at the current instant, storing the elapsed time passed as argument.

long int MipBaselib::Time::usec (  )  const [inherited]

Gets the microseconds.


Variable Documentation

long int MipBaselib::Time::_usec [protected, inherited]

const int MipBaselib::Time::TIME_RESOLUTION = 1000000 [static, protected, inherited]

an integer beetween


Generated on Mon Feb 20 07:01:09 2017 for MIP by  doxygen 1.5.6