> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::OperatorTimestampLabel

> This struct represents a timestamp label for a Holoscan Operator.

This struct represents a timestamp label for a Holoscan [Operator](../classes/operator).

The class stores information about the timestamps when an operator receives from an input and when it publishes to an output. It also holds a reference to the operator.

This class is used by [MessageLabel](../classes/messagelabel) to create an array of Operators representing a path.

```cpp showLineNumbers={false}
#include <holoscan/messagelabel.hpp>
```

---

## Constructors

### OperatorTimestampLabel \[#operatortimestamplabel]

#### Default

```cpp showLineNumbers={false}
holoscan::OperatorTimestampLabel::OperatorTimestampLabel() = default
```

#### Copy (with op name)

inline

explicit

```cpp showLineNumbers={false}
holoscan::OperatorTimestampLabel::OperatorTimestampLabel(
    const std::string &op_name
)
```

Construct a new `OperatorTimestampLabel` object from an [Operator](../classes/operator) pointer with a receive timestamp equal to the current time and publish timestamp equal to -1.

**Parameters**

**`op_name`** `const std::string &`

The fully qualified name of the operator for which the timestamp label is created.

---

#### Copy (with op name and rec t and pub t)

inline

```cpp showLineNumbers={false}
holoscan::OperatorTimestampLabel::OperatorTimestampLabel(
    const std::string &op_name,
    int64_t rec_t,
    int64_t pub_t
)
```

#### Copy (with o)

inline

```cpp showLineNumbers={false}
holoscan::OperatorTimestampLabel::OperatorTimestampLabel(
    const OperatorTimestampLabel &o
)
```

---

## Assignment operators

### operator= \[#operator\_assign]

```cpp showLineNumbers={false}
OperatorTimestampLabel & holoscan::OperatorTimestampLabel::operator=(
    const OperatorTimestampLabel &o
)
```

---

## Methods

### set\_pub\_timestamp\_to\_current \[#setpubtimestamptocurrent]

```cpp showLineNumbers={false}
void holoscan::OperatorTimestampLabel::set_pub_timestamp_to_current()
```

---

## Member variables

| Name            | Type          | Description |
| --------------- | ------------- | ----------- |
| `operator_name` | `std::string` |             |
| `rec_timestamp` | `int64_t`     |             |
| `pub_timestamp` | `int64_t`     |             |