# MemorySample

> One point of the timeline memory chart: when the sample was taken and how much memory was in use.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Panel](/docs/extensions/debug-core/reference/panel/index.md) › MemorySample

| final readonly class | `PHPForge\Debug\Panel\MemorySample` |
| --- | --- |
| Source | [`src/Panel/MemorySample.php`](https://github.com/php-forge/debug-core/blob/main/src/Panel/MemorySample.php#L10) |

One point of the timeline memory chart: when the sample was taken and how much memory was in use.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-memory"></span>`$memory` readonly constructor | `int` | Memory usage in bytes at that timestamp. | `MemorySample` |
| <span id="property-time"></span>`$time` readonly constructor | `float` | Sample timestamp in milliseconds since the Unix epoch. | `MemorySample` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates a timestamped memory sample. | `MemorySample` |

## Method details

### __construct() <span id="method-__construct"></span>

```php
public function __construct(float $time, int $memory)
```

Creates a timestamped memory sample.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$time` | `float` |  |
| `$memory` | `int` |  |