TimelineGeometry
API reference › Debug Core › Panel › Timeline › TimelineGeometry
Computes framework-neutral timeline ruler positions and profile-span geometry.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
rulers() static | Returns adaptive ruler ticks keyed by milliseconds and valued by percentage offsets. | TimelineGeometry |
spans() static | Converts captured profile rows into positioned timeline spans. | TimelineGeometry |
Method details
Section titled “Method details”rulers()
Section titled “rulers() ”public static function rulers(float $duration, int $line = 6): array<int, float>Returns adaptive ruler ticks keyed by milliseconds and valued by percentage offsets.
Parameters
| Parameter | Type | Description |
|---|---|---|
$duration | float | |
$line | int |
Returns
array<int, float>: Ruler offsets.
spans()
Section titled “spans() ”public static function spans(list<PHPForge\Debug\Panel\Profile\ProfileRow> $rows, float $start, float $duration): list<PHPForge\Debug\Panel\Timeline\TimelineSpanRow>Converts captured profile rows into positioned timeline spans.
Parameters
| Parameter | Type | Description |
|---|---|---|
$rows | list<PHPForge\> | Profile rows in capture order. |
$start | float | |
$duration | float |
Returns
list<TimelineSpanRow>: Positioned spans in capture order.