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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Select and time signals

> Choose by completion, resume later, or enforce a durable deadline.

| Result                                       | Operator                                                 |
| -------------------------------------------- | -------------------------------------------------------- |
| First causally related input to emit or fail | [`race`](/reference/runtime/signal-operators#race)       |
| Resume one occurrence after a duration       | [`delay`](/reference/runtime/signal-operators#delay)     |
| Fail one signal at a durable deadline        | [`timeout`](/reference/runtime/signal-operators#timeout) |

```ts automations/choose-first-timer.automation.ts theme={null}
import {
  automation,
  delay,
  onHttpRequest,
  race,
  respondToHttpRequest,
  withPrerequisites,
} from "automate.ax"

export default automation("Choose first timer", () => {
  const request = onHttpRequest()
  const winner = withPrerequisites(request, () =>
    race([
      delay("2s").transform(() => "slow"),
      delay("1s").transform(() => "fast"),
    ]),
  )

  respondToHttpRequest({ body: winner, requestId: request.requestId })
})
```

Use `race` when completion order matters within one causal occurrence: emission or failure wins, and closed inputs leave the race. Its inputs must share an activation boundary. Use [`merge`](/reference/runtime/signal-operators#merge) when independent trigger streams should start the same flow.

Literal delays declare hidden delivery triggers. Scope them to the initiating signal with `withPrerequisites`. Value-carrying delays and timeouts use their source as the anchor.

Use [Control event bursts](/guides/control-event-bursts) when timing repeated occurrences instead of one causal occurrence.
