1 = YAML clock type object
3 A _**clock type object**_ is the type of data stream
4 xref:how-barectf-works:ctf-primer.adoc#def-clk[clocks].
6 Clock type objects are only found under the
7 xref:trace-type-obj.adoc#clk-types-prop[`clock-types` property] of a
10 The only purpose of a clock type is to be a
11 xref:dst-obj.adoc[data stream type object]'s default
17 All the properties are optional.
19 [%autowidth.stretch, cols="d,d,a,d", role="can-break"]
21 |Name |Type |Description |Default
23 |[[freq-prop]]`frequency`
24 |Integer, greater than{nbsp}0
25 |Frequency of instances (Hz).
26 |1,000,000,000 (1{nbsp}GHz)
28 |[[offset-prop]]`offset`
31 |See <<offset-obj>> for default values.
33 |`origin-is-unix-epoch`
35 |True if the origin of instances is the Unix epoch.
40 |Precision of instances (cycles).
44 |xref:common-values.adoc#uuid[UUID]
50 |Clock type's description.
53 |[[c-type-prop]]`$c-type`
55 |Return C{nbsp}type of the clock source function for this clock type.
57 See xref:platform:index.adoc[] to learn more.
60 |[[include-prop]]`$include`
62 |See xref:include.adoc[].
67 == Clock type offset object
69 Offset information of a clock type's instances.
73 All the properties are optional.
75 [%autowidth.stretch, cols="d,d,a,d"]
77 |Name |Type |Description |Default
90 The two properties form an effective offset (from the clock's origin) as
94 seconds + cycles / frequency
97 `frequency` is a <<freq-prop,clock type property>>.
101 .Basic 1{nbsp}GHz clock type object.
103 This empty mapping, when used where a clock type is expected, is a
104 valid, default clock type.
112 .Basic <<freq-prop,100{nbsp}kHz>> clock type object.
120 .Basic <<freq-prop,1{nbsp}GHz>> clock type object with an `unsigned long long` <<c-type-prop,C{nbsp}type>>.
124 $c-type: unsigned long long
128 .Complete clock type object.
136 origin-is-unix-epoch: false
138 uuid: 79e49040-21b5-42d4-a873-677261696e65
139 description: System clock
144 .Clock type object with an <<include-prop,inclusion>>.
148 $include: [base-clock-type.yaml]