> ## Documentation Index
> Fetch the complete documentation index at: https://torqpy.itsdote.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Types & units

> Time, Dur, Wait, and module-level duration constants.

```python theme={null}
from torq import Time, Dur, Wait, second, ms, samp, minute
```

## Symbols

| Symbol | Role |
| - | - |
| `Time` | Logical instant (rational seconds) |
| `Dur` | Duration (rational seconds) |
| `Wait` | Awaitable wait token from `~dur` / invert |
| `second`, `ms`, `minute` | Module-level durations |
| `samp` | One sample at 48000 Hz (use `clock.samp` for other rates) |

## Arithmetic

Legal mixes:

* `time ± dur` → `Time`
* `time − time` → `Dur`
* `dur ± dur` → `Dur`
* `dur * number` / `number * dur` → `Dur`
* `dur / dur` → `Fraction`

Illegal mixes raise `TypeError`. Non-finite floats are rejected.

```python theme={null}
from torq import Time, Dur, second, ms

t0 = Time(0)
t1 = t0 + 500 * ms
assert t1 - t0 == Dur("1/2")
assert (2 * second) / second == 2
```

## Wait tokens

`~dur` produces a `Wait`. Generators can `yield ~d` or `yield d`; async shreds use `await (~d)` (parentheses required).

```python theme={null}
from torq import ms

token = ~(250 * ms)
assert isinstance(token, type(~(1 * ms)))
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.