|
| TimeSpec (const TimeSpec &) |
| Copy constructor.
|
|
| TimeSpec (TimeTickType validity_start, TimeTickType validity_end) |
| Complete constructor, with the start and end time. More...
|
|
| TimeSpec (int validity_start, int validity_end) |
| Complete constructor, with the start and end time. More...
|
|
| TimeSpec (TimeTickType validity_start) |
| Constructor for a TimeSpec that starts and ends at the same time. More...
|
|
| TimeSpec (double validity_start, double validity_end) |
| Constructor with double arguments. More...
|
|
| TimeSpec (float validity_start, float validity_end) |
| Variation with float. More...
|
|
| TimeSpec (const DataTimeSpec &) |
| Constructor with a DataTimeSpec as input.
|
|
| TimeSpec () |
| Default constructor.
|
|
virtual | ~TimeSpec () |
| Destructor.
|
|
virtual TimeSpec * | clone () const |
| This clones a TimeSpec, giving back a pointer to an identical copy. More...
|
|
virtual bool | advance (const TimeSpec &a) |
| Move the time forward with the data given in another TimeSpec. More...
|
|
virtual bool | advance (const DataTimeSpec &a) |
| Move the time forward with the data given in a DataTimeSpec. More...
|
|
virtual bool | advance (const TimeTickType &validity_end=MAX_TIMETICK) |
| Move the time to the next contiguous interval, that ends at the end tick specified in the parameter. More...
|
|
virtual bool | forceAdvance (const TimeTickType &validity_point) |
| Jump ahead in time, possibly leaving a gap. More...
|
|
virtual bool | forceAdvance (const DataTimeSpec &t) |
| Jump ahead in time, possibly leaving a gap. More...
|
|
TimeTickType | getValidityStart () const |
| Returns the time at which the interval starts.
|
|
TimeTickType | getValidityEnd () const |
| Returns the time at which the interval has ended.
|
|
TimeTickType | getValiditySpan () const |
| Returns the size of the interval.
|
|
bool | operator== (const TimeSpec &other) const |
| Compare one interval to another.
|
|
bool | operator!= (const TimeSpec &other) const |
| Compare one interval to another, and return true when not equal.
|
|
TimeSpec | operator+ (const int &delta) const |
| Move an interval up with a time delta.
|
|
TimeSpec | operator+ (const double delta) const |
| Move an interval up with a time in seconds.
|
|
TimeSpec | operator+ (const float delta) const |
| Move an interval up with a time in seconds.
|
|
TimeSpec | operator- (const double delta) const |
| Move an interval up with a time in seconds.
|
|
TimeSpec | operator- (const float delta) const |
| Move an interval up with a time in seconds.
|
|
TimeSpec | operator- (const int &delta) const |
| Move an interval back with a time delta.
|
|
int | operator- (const TimeSpec &to) const |
| Get the difference between two timespec's.
|
|
TimeSpec & | operator= (const DataTimeSpec &o) |
| Copy from a data timespec.
|
|
double | getDtInSeconds () const |
| Get the value of the interval in seconds.
|
|
int | getUsecsElapsed () const |
| Find out how many microseconds elapsed since the formal start of this time. More...
|
|
ostream & | print (ostream &os) const |
| Write to stream, mainly for debugging purposes.
|
|
A TimeSpec is a specification for a time interval.
It is given in integer time steps, and defines the step from which the time interval is valid, and the step from which it is no longer valid.
dueca::TimeSpec::TimeSpec |
( |
double |
validity_start, |
|
|
double |
validity_end |
|
) |
| |
Constructor with double arguments.
Note that the argument will be converted to time ticks, and that rounding off may occur.
If start and end are not exactly (as in floating point exactly) equal, the integer end time tick will always be at least one higher than the start time tick. This is to prevent creation of 0 timespans, which can produce infinite loops in clocks.
- Parameters
-
validity_start | time (in s!) at which data becomes valid |
validity_end | time (in s!) at which data (calc, etc.) becomes invalid. |