clock: show that enumerations need to have their type declared
[ctf.git] / common-trace-format-specification.txt
index 95126f1859cf995e7bd27ccbec50445fd53de81f..90a669b849a4fb45f7b47e66723f64e1c3217f12 100644 (file)
@@ -1250,13 +1250,15 @@ struct {
 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,
 };
 
@@ -1266,7 +1268,7 @@ clock[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;
 };
 
@@ -1277,9 +1279,10 @@ field. The "freq" field is the initial frequency of the clock, in Hz. If
 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:
This page took 0.022606 seconds and 4 git commands to generate.