> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# AndroidHostPlatformTiming

APISummary
This interface describes the performance data specific to Android platform's Measure, Layout, and Draw operations in the [Lynx Pipeline](/next/guide/spec.md#lynx-pipeline), as shown in the following diagram:

![](https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/plugin/static/host-platform-timing.png)
## Examples

This example shows how to generate and obtain `AndroidHostPlatformTiming`.

**This is an example below: performance-api**

**Entry:** `src/host-platform-timing`
**Bundle:** `dist/host-platform-timing.lynx.bundle`

```tsx {21-21}
import { root, useEffect, useState } from "@lynx-js/react";
import type { PerformanceEntry, PipelineEntry } from "@lynx-js/types";
import { ScrollItem } from "../common/scroll-item/index.jsx";
import "./index.scss";

export default function PipelineEntryExample() {
  const [myName, setMyName] = useState<string | undefined>(undefined);
  const [pipelineEntry, setPipelineEntry] = useState("");
  const [hostPlatformTiming, setHostPlatformTiming] = useState("");

  useEffect(() => {
    "background-only";
    // 1. Create a performance observer.
    const observer = lynx.performance.createObserver((entry: PerformanceEntry) => {
      if (entry.entryType == "pipeline") {
        // 3. Received "pipeline" event of "myPipeline".
        const pipelineEntry = entry as PipelineEntry;
        // `PerformanceEntry.identifier` is equal to `view.__lynx_timing_flag`.
        if (pipelineEntry.identifier == "myNamePipeline") {
          setPipelineEntry(JSON.stringify(pipelineEntry, null, 4));
          setHostPlatformTiming(JSON.stringify(pipelineEntry.hostPlatformTiming, null, 4));
        }
      }
    });
    // 2. Register to listen to the "pipeline" event.
    observer.observe(["pipeline"]);

    // Update real data after simulating a network request.
    setTimeout(() => {
      setMyName("HostPlatformTiming");
    }, 2000);
  }, []);

  return (
    <view className="container">
      <text className="title" __lynx_timing_flag={myName ? "myNamePipeline" : ""}>Hello {myName}~</text>
      <ScrollItem title="HostPlatformTiming" value={hostPlatformTiming} height="220px" />
      <ScrollItem title="PipelineEntry" value={pipelineEntry} />
    </view>
  );
}

root.render(<PipelineEntryExample />);

if (import.meta.webpackHot) {
  import.meta.webpackHot.accept();
}

```

v0.8.0



## Instance Properties

### hostPlatformType

```tsx
hostPlatformType: string;
```

A string describing the Host Platform type, with default value: `Android`.

### measureStart

```tsx
measureStart: number;
```

The timestamp when the first execution of [LynxView](/next/guide/spec.md#lynxview)'s [onMeasure](https://developer.android.com/reference/android/view/View#onMeasure\(int,%20int\)) starts in a Lynx Pipeline. This timestamp is a Unix timestamp represented as a floating-point number (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.

### measureEnd

```tsx
measureEnd: number;
```

The timestamp when the last execution of [LynxView](/next/guide/spec.md#lynxview)'s [`onMeasure`](https://developer.android.com/reference/android/view/View#onMeasure\(int,%20int\)) ends in a Lynx Pipeline. This timestamp is a Unix timestamp represented as a floating-point number (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.

### layoutStart

```tsx
layoutStart: number;
```

The timestamp when the first execution of [LynxView](/next/guide/spec.md#lynxview)'s [`onLayout`](https://developer.android.com/reference/android/view/View#onLayout\(boolean,%20int,%20int,%20int,%20int\)) starts in a Lynx Pipeline. This timestamp is a Unix timestamp represented as a floating-point number (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.

### layoutEnd

```tsx
layoutEnd: number;
```

The timestamp when the last execution of [LynxView](/next/guide/spec.md#lynxview)'s [`onLayout`](https://developer.android.com/reference/android/view/View#onLayout\(boolean,%20int,%20int,%20int,%20int\)) ends in a Lynx Pipeline. This timestamp is a Unix timestamp represented as a floating-point number (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.

### drawStart

```tsx
drawStart: number;
```

The timestamp when the execution of [LynxView](/next/guide/spec.md#lynxview)'s [`dispatchDraw`](https://developer.android.com/reference/android/view/View#dispatchDraw\(android.graphics.Canvas\)) starts in a Lynx Pipeline. This timestamp is a Unix timestamp represented as a floating-point number (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.

### drawEnd

```tsx
drawEnd: number;
```

The timestamp when the execution of [LynxView](/next/guide/spec.md#lynxview)'s [`dispatchDraw`](https://developer.android.com/reference/android/view/View#dispatchDraw\(android.graphics.Canvas\)) ends in a Lynx Pipeline. This timestamp is a Unix timestamp represented as a floating-point number (in milliseconds), accurate to three decimal places. For example: 1739594612307.429.

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.performance-api.host-platform-timing.android-host-platform-timing`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/performance-api/host-platform-timing/android-host-platform-timing.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| android-host-platform-timing | Yes (3.1) | Yes (3.4) | Yes (3.1) | Yes (3.7) | Yes (3.7) | No |

