37 #define SUMOTime_MAX std::numeric_limits<SUMOTime>::max() 38 #define SUMOTime_MIN std::numeric_limits<SUMOTime>::min() 39 #define SUMOTIME_MAXSTRING "9223372036854774" // SUMOTime_MAX / 1000 - 1 (because of rounding errors) 45 #define TS (static_cast<double>(DELTA_T/1000.)) 48 #define SPEED2DIST(x) ((x)*TS) 50 #define DIST2SPEED(x) ((x)/TS) 52 #define ACCEL2DIST(x) ((x)*TS*TS) 54 #define ACCEL2SPEED(x) ((x)*TS) 56 #define SPEED2ACCEL(x) ((x)/TS) 58 #define STEPS2TIME(x) (static_cast<double>((x)/1000.)) 60 #define TIME2STEPS(x) (static_cast<SUMOTime>((x)*1000 + (x >= 0 ? 0.5 : -0.5))) 61 #define STEPFLOOR(x) (int(x/DELTA_T)*DELTA_T) 62 #define STEPS2MS(x) (x) 64 #define SIMSTEP MSNet::getInstance()->getCurrentTimeStep() 65 #define SIMTIME STEPS2TIME(MSNet::getInstance()->getCurrentTimeStep())
std::string time2string(SUMOTime t)
SUMOTime string2time(const std::string &r)