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

# stanza.timing



## Module Contents

### Functions

| Name | Description |
|------|-------------|
| [`seconds_to_ns`](#stanzatimingseconds_to_ns) | Convert seconds to nanoseconds, rounded to the nearest integer. |
| [`to_epoch`](#stanzatimingto_epoch) | Convert a timestamp to epoch time. |

### API

```python
stanza.timing.seconds_to_ns(seconds: float) -> int
```

Convert seconds to nanoseconds, rounded to the nearest integer.

**Parameters:**

**Returns:**

int: Time in nanoseconds


```python
stanza.timing.to_epoch(timestamp: float | int | datetime.datetime) -> float
```

Convert a timestamp to epoch time.

**Parameters:**

**Returns:**

float: Epoch time