Package org.robolectric.shadows
Class FrameMetricsBuilder
- java.lang.Object
-
- org.robolectric.shadows.FrameMetricsBuilder
-
public final class FrameMetricsBuilder extends Object
Class to buildFrameMetrics
-
-
Constructor Summary
Constructors Constructor Description FrameMetricsBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FrameMetricsbuild()FrameMetricsBuildersetMetric(int metric, long value)Sets the given metric to the given value.FrameMetricsBuildersetSyncDelayTimeNanos(long syncDelayTimeNanos)Sets the delay time between when drawing finishes and syncing begins.
-
-
-
Method Detail
-
setMetric
public FrameMetricsBuilder setMetric(int metric, long value)
Sets the given metric to the given value.If this is not called for a certain metric, that metric will be assumed to have the value 0. The value of
frameMetrics.getMetric(FrameMetrics.TOTAL_DURATION)will be equal to the sum of all non-boolean metrics and the value given to {@link this#setSyncDelayTimeNanos(long)}.
-
setSyncDelayTimeNanos
public FrameMetricsBuilder setSyncDelayTimeNanos(long syncDelayTimeNanos)
Sets the delay time between when drawing finishes and syncing begins. If unset, defaults to 0.
-
build
public FrameMetrics build() throws Exception
- Throws:
Exception
-
-