OMNeT++ Simulation Library
5.6.1
|
The simulation kernel and models use simtime_t to represent simulation time. simtime_t is an alias to the SimTime class that is 64-bit fixed-point representation with a globally shared exponent. This group describes simtime_t, SimTime, and related types and macros.
Classes | |
class | SimTime |
int64_t-based, base-10 fixed-point simulation time. More... | |
Macros | |
#define | SIMTIME_MAX omnetpp::SimTime::getMaxTime() |
The maximum representable simulation time with the current resolution. More... | |
#define | SIMTIME_ZERO omnetpp::SimTime::ZERO |
Zero simulation time. More... | |
#define | SIMTIME_STR(t) ((t).str().c_str()) |
Convert simtime_t to a C string. More... | |
#define | SIMTIME_DBL(t) ((t).dbl()) |
Convert simtime_t to a double. This conversion incurs precision loss. More... | |
Typedefs | |
typedef SimTime | simtime_t |
Represents simulation time. More... | |
typedef const simtime_t & | simtime_t_cref |
Constant reference to a simtime_t. More... | |
typedef const double | const_simtime_t |
This type must be used for global variables representing simulation time. More... | |
Enumerations | |
enum | SimTimeUnit |
Enum for simulation time base-10 exponents. More... | |
#define SIMTIME_MAX omnetpp::SimTime::getMaxTime() |
The maximum representable simulation time with the current resolution.
#define SIMTIME_ZERO omnetpp::SimTime::ZERO |
Zero simulation time.
Using SIMTIME_ZERO can be more efficient than using the 0 constant, especially in non-optimized (debug) builds, because it spares the SimTime constructor call.
Referenced by cIdealChannel::calculateDuration(), cDelayChannel::getTransmissionFinishTime(), cIdealChannel::getTransmissionFinishTime(), and cSimpleModule::send().
#define SIMTIME_STR | ( | t | ) | ((t).str().c_str()) |
Convert simtime_t to a C string.
#define SIMTIME_DBL | ( | t | ) | ((t).dbl()) |
Convert simtime_t to a double. This conversion incurs precision loss.
typedef const simtime_t& simtime_t_cref |
Constant reference to a simtime_t.
In many configurations (e.g. debug builds), it is more efficient to return a SimTime from a function as a const ref than by value.
typedef const double const_simtime_t |
This type must be used for global variables representing simulation time.
The normal simtime_t type (i.e. SimTime) cannot be used for static variables, because the scale exponent is only available after the configuration has been read by the simulation program. This type is simply an alias of double
.
enum SimTimeUnit |
Enum for simulation time base-10 exponents.