Change-Id: Ia42daadc9606335073da59a547e93867f445ed91
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/30990
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
/**
* The clock of the trace
*/
- private CTFClock fSingleClock;
+ private CTFClock fSingleClock = null;
/**
* Packet header structure definition
* @return the clock
*/
public final CTFClock getClock() {
+ if (fSingleClock != null && fClocks.size() == 1) {
+ return fSingleClock;
+ }
if (fClocks.size() == 1) {
fSingleClock = fClocks.get(fClocks.keySet().iterator().next());
return fSingleClock;