All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
risc::sg::Time Class Reference

This class represents timing in discrete event simulation. More...

#include <time.h>

Collaboration diagram for risc::sg::Time:
Collaboration graph

Public Member Functions

 Time ()
 This constructor initializes the time values with (0,0) More...
 
 Time (unsigned long long time_units, int delta_count)
 
 Time (unsigned long long time_units, int delta_count, bool infinite)
 
 Time (bool infinite)
 
bool operator< (const Time &ohs)
 
bool operator> (const Time &ohs)
 
bool operator<= (const Time &ohs)
 
bool operator>= (const Time &ohs)
 
bool operator== (const Time &ohs)
 
bool operator!= (const Time &ohs)
 
Time operator+ (const Time &ohs)
 
Timeoperator+= (const Time &ohs)
 
bool one_delta_cycle_ahead (const Time &ohs)
 The function checks if the difference between this and the given time stamp is exactly one delta cycle. More...
 

Static Public Member Functions

static long long convert_si_magnitude (std::string magnitude)
 

Public Attributes

int delta_count_
 
unsigned long long time_units_
 
bool infinite_
 This flag is set to describe an infinite amount of time. More...
 

Detailed Description

This class represents timing in discrete event simulation.

Constructor & Destructor Documentation

risc::sg::Time::Time ( )

This constructor initializes the time values with (0,0)

This constructor should be used to set the infinite flag.

This constructor initializes the time values with user custom values.

risc::sg::Time::Time ( unsigned long long  time_units,
int  delta_count 
)
risc::sg::Time::Time ( unsigned long long  time_units,
int  delta_count,
bool  infinite 
)
risc::sg::Time::Time ( bool  infinite)

Member Function Documentation

long long risc::sg::Time::convert_si_magnitude ( std::string  magnitude)
static
risc::sg::Time::one_delta_cycle_ahead ( const Time ohs)

The function checks if the difference between this and the given time stamp is exactly one delta cycle.

bool risc::sg::Time::operator!= ( const Time ohs)
risc::sg::Time risc::sg::Time::operator+ ( const Time ohs)
risc::sg::Time & risc::sg::Time::operator+= ( const Time ohs)
bool risc::sg::Time::operator< ( const Time ohs)
bool risc::sg::Time::operator<= ( const Time ohs)
bool risc::sg::Time::operator== ( const Time ohs)
bool risc::sg::Time::operator> ( const Time ohs)
bool risc::sg::Time::operator>= ( const Time ohs)

Member Data Documentation

int risc::sg::Time::delta_count_
bool risc::sg::Time::infinite_

This flag is set to describe an infinite amount of time.

unsigned long long risc::sg::Time::time_units_

The documentation for this class was generated from the following files: