Expand description
This module contains the different time representations of the interpreter.
§Time Representations
The RTLola interpreter supports multiple representations of time in its input and output. If run in offline mode, meaning the time for an event is parsed from the input source, the format in which the time is present in the input has to be set. Consider the following example CSV file:
a,b,time 0,1,0.1 2,3,0.2 4,5,0.3
The supported time representations are:
§Relative
Time is considered relative to a fixed point in time. Call this point in time x then in the example above
the first event gets the timestamp x + 0.1, the second one x + 0.2 and so forth.
§Incremental
Time is considered relative to the preceding event. This induces the following timestamps for the above example:
a,b, time 0,1, x + 0.1 2,3, x + 0.3 4,5, x + 0.6
§Absolute
Time is parsed as absolute timestamps.
Note: The evaluation of periodic streams depends on the time passed between events. Depending on the representation, determining the time that passed before the first event is not obvious. While the relative and incremental representations do not strictly need a point of reference to determine the time passed, the absolute representation requires such a point of reference. This point of time can either be directly supplied during configuration using the start_time method or inferred as the time of the first event. The latter consequently assumes that no time has passed before the first event in the input.
Structs§
- Absolute
Float - Time represented as wall clock time given as a positive real number representing seconds and sub-seconds since the start of the Unix Epoch.
- Absolute
Rfc - Time represented as wall clock time in RFC3339 format.
- Delay
Time - Time is set to be a fixed delay between input events. The time given is ignored, and the fixed delay is applied.
- Offset
Float - Time represented as a positive real number representing seconds and sub-seconds as the offset to the preceding event.
- Offset
Nanos - Time represented as the unsigned number in nanoseconds as the offset to the preceding event.
- Real
Time - Time is set to be real-time. I.e. the input time is ignored and the current timestamp in rfc3339 format is taken instead.
- Relative
Float - Time represented as a positive real number representing seconds and sub-seconds relative to a fixed start time. ie. 5.2
- Relative
Nanos - Time represented as the unsigned number of nanoseconds relative to a fixed start time.
Traits§
- Output
Time Representation - This trait captures the subset TimeRepresentations suitable for output.
- Time
Conversion - Convert the InnerTime of an OutputTimeRepresentation to a generic type T.
- Time
Mode - This trait captures whether the time is given explicitly through a timestamp or is indirectly obtained through measurements.
- Time
Representation - The functionality a time format has to provide.
Functions§
- parse_
float_ time - Precisely parses an duration from a string of the form ‘{secs}.{sub-secs}’