next up previous contents index
Next: String Handling Up: Miscellaneous Previous: Miscellaneous   Contents   Index


Time Span and Time

Sometimes, we are confused with two concepts: time span and time. A time span means the time duration between a starting time and an ending time in which the starting time and the ending time are specific values within the time horizon. In general, the time horizon consists of all the non-negative real numbers. But a time value is for a specific value within the time horizon.

In DEVS++, TimeSpan and Time are defined as double in Devs.h.

typedef double TimeSpan ;
typedef double Time;

When we want to check if a pair a and b are the same in terms of a tolerance tol, we can use the following function defined in Devs.h.

bool DEVSpp::IsEqual(double a, double b, double tol=1E-3);
Since both types of a and b are double, we can be for checking for Time and TimeSpan, respectively.



MHHwang 2007-05-07