Clock metadata allows to describe the clock topology of the system, as
well as to detail each clock parameter. In absence of clock description,
it is assumed that all fields named "timestamp" use the same clock
-source, which increment once per nanosecond.
+source, which increments once per nanosecond.
Describing a clock and how it is used by streams is threefold: first,
the clock and clock topology should be described in a "clock"
description block, e.g.:
-enum clocks {
+typealias integer { size = 32; align = 32; signed = true } := uint32_t;
+
+enum clocks : uint32_t {
cycle_counter,
};
freq = 1000000000; /* frequency, in Hz */
/* precision in seconds is: 1000 * (1/freq) */
precision = 1000;
- /* clock value offset from Jan 01 1970 is: offset * (1/freq) */
+ /* clock value offset from Epoch is: offset * (1/freq) */
offset = 1326476837897235420;
};
the "freq" field is not present, the frequency is assumed to be
1000000000 (providing clock increment of 1 ns). The optional "precision"
field details the uncertainty on the clock measurements, in (1/freq)
-units. The "offset" field indicates the offset from Jan 01 1970 to the
-zero of value of the clock, in (1/freq) units. If the "offset" field is
-not present, it is assigned the 0 value.
+units. The "offset" field indicates the offset from POSIX.1 Epoch,
+1970-01-01 00:00:00 +0000 (UTC), to the zero of value of the clock, in
+(1/freq) units. If the "offset" field is not present, it is assigned the
+0 value.
Secondly, a reference to this clock should be added within an integer
type: