From: Patrick Tasse Date: Thu, 10 Nov 2016 14:57:48 +0000 (-0500) Subject: ctf: Fix clock-related Javadoc in CTFTrace X-Git-Url: http://git.efficios.com/?p=deliverable%2Ftracecompass.git;a=commitdiff_plain;h=80d061d78a64db648e9eb5cc7702cbdc0f70bcff ctf: Fix clock-related Javadoc in CTFTrace Change-Id: Ibde44bbf044424dcf32981eb9e4dc7557f6f1925 Signed-off-by: Patrick Tasse Reviewed-on: https://git.eclipse.org/r/84821 Reviewed-by: Matthew Khouzam Tested-by: Matthew Khouzam Reviewed-by: Hudson CI --- diff --git a/ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/trace/CTFTrace.java b/ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/trace/CTFTrace.java index 5053c34ded..2f09e7d620 100644 --- a/ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/trace/CTFTrace.java +++ b/ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/trace/CTFTrace.java @@ -676,9 +676,9 @@ public class CTFTrace implements IDefinitionScope { } /** - * gets the time offset of a clock with respect to UTC in nanoseconds + * Gets the clock offset with respect to POSIX.1 Epoch in cycles * - * @return the time offset of a clock with respect to UTC in nanoseconds + * @return the clock offset with respect to POSIX.1 Epoch in cycles */ public final long getOffset() { if (getClock() == null) { @@ -688,9 +688,9 @@ public class CTFTrace implements IDefinitionScope { } /** - * gets the time offset of a clock with respect to UTC in nanoseconds + * Gets the time scale in nanoseconds/cycle * - * @return the time offset of a clock with respect to UTC in nanoseconds + * @return the time scale in nanoseconds/cycle */ private double getTimeScale() { if (getClock() == null) { @@ -742,9 +742,9 @@ public class CTFTrace implements IDefinitionScope { } /** - * the inverse clock for returning to a scale. + * Gets the inverse time scale in cycles/nanosecond * - * @return 1.0 / scale + * @return the inverse time scale in cycles/nanosecond */ private double getInverseTimeScale() { if (getClock() == null) { @@ -754,9 +754,11 @@ public class CTFTrace implements IDefinitionScope { } /** + * Gets the clock cycles count for a specified time + * * @param cycles - * clock cycles since boot - * @return time in nanoseconds UTC offset + * clock cycles relative to clock offset + * @return time in nanoseconds relative to POSIX.1 Epoch */ public long timestampCyclesToNanos(long cycles) { long retVal = cycles + getOffset(); @@ -771,9 +773,11 @@ public class CTFTrace implements IDefinitionScope { } /** + * Gets the time for a specified clock cycle count + * * @param nanos - * time in nanoseconds UTC offset - * @return clock cycles since boot. + * time in nanoseconds relative to POSIX.1 Epoch + * @return clock cycles relative to clock offset */ public long timestampNanoToCycles(long nanos) { long retVal;