simtime_t.h Source File

API: simtime_t.h Source File
API
simtime_t.h
1//==========================================================================
2// SIMTIME_T.H - part of
3// OMNeT++/OMNEST
4// Discrete System Simulation in C++
5//
6//==========================================================================
7
8/*--------------------------------------------------------------*
9 Copyright (C) 1992-2017 Andras Varga
10 Copyright (C) 2006-2017 OpenSim Ltd.
11
12 This file is distributed WITHOUT ANY WARRANTY. See the file
13 `license' for details on this and other legal matters.
14*--------------------------------------------------------------*/
15
16#ifndef __OMNETPP_SIMTIME_T_H
17#define __OMNETPP_SIMTIME_T_H
18
19#include <cstdlib>
20#include <string>
21#include <cmath>
22#include <cfloat>
23#include "simkerneldefs.h"
24#include "simtime.h"
25
26#ifdef USE_DOUBLE_SIMTIME
27#error USE_DOUBLE_SIMTIME is no longer supported -- use OMNeT++ 4.x if you need it
28#endif
29
30namespace omnetpp {
31
36
41
49
57typedef const double const_simtime_t;
58
62#define SIMTIME_MAX omnetpp::SimTime::getMaxTime()
63
70#define SIMTIME_ZERO omnetpp::SimTime::ZERO
71
75#define SIMTIME_STR(t) ((t).str().c_str())
76
80#define SIMTIME_DBL(t) ((t).dbl())
81
83
84} // namespace omnetpp
85
86#endif
87
int64_t-based, base-10 fixed-point simulation time.
Definition simtime.h:67
SimTime simtime_t
Represents simulation time.
Definition simtime_t.h:40
const simtime_t & simtime_t_cref
Constant reference to a simtime_t.
Definition simtime_t.h:48
const double const_simtime_t
This type must be used for global variables representing simulation time.
Definition simtime_t.h:57