# Referencia de la API node:timers

`node:timers` exporta temporizadores con funciones de retorno: `setTimeout` / `clearTimeout`,
`setInterval` / `clearInterval` y `setImmediate` /
`clearImmediate`. Ofrecen la misma API que los globales de temporizador, pero no son
los mismos objetos de función JavaScript. No se exponen los métodos heredados `active()` y `unenroll()`.

## node:timers/promises

| Exportación | Propósito |
|---|---|
| `setTimeout(delay?, value?, options?)` | Se resuelve con `value` tras el retardo. |
| `setImmediate(value?, options?)` | Se resuelve en un turno inmediato. |
| `setInterval(delay?, value?, options?)` | Produce un iterador asíncrono. |
| `scheduler` | Proporciona `wait()` y `yield()`. |

Los temporizadores con Promise aceptan un `AbortSignal` y se rechazan con `AbortError` cuando
se aborta. Los temporizadores pendientes, con funciones de retorno o con Promise, mantienen vivo un proceso
`elide run` independiente hasta que terminan.

## Véase también

- [Globales de temporizador](/docs/api-html-timers)
- [API de timers de Node.js](https://nodejs.org/api/timers.html)

<!-- api-reference:start 6e1b45e455f6 -->
## Reference

**Status:** Full · 54 of 57 suite tests pass (94.7%) · since 1.1.0

### Exports

| Export | Kind | Status | Notes |
| --- | --- | --- | --- |
| `setTimeout()` | function | Full | Schedules a callback to be invoked once after `delay` milliseconds |
| `clearTimeout()` | function | Full | Cancels a timeout previously established by setTimeout() |
| `setInterval()` | function | Full | Schedules a callback to be invoked repeatedly every `delay` milliseconds |
| `clearInterval()` | function | Full | Cancels an interval previously established by setInterval() |
| `setImmediate()` | function | Full | Schedules a callback to be invoked asynchronously "immediately" (after I/O events but before timers… |
| `clearImmediate()` | function | Full | Cancels an immediate action previously established by setImmediate() |

**Tests:** [node-api `node:timers`](https://github.com/elide-dev/testsuite/blob/main/reports/1.6.0%2B6e718933f/4cbcae6c33a8/node-api/node-api.md): 54 pass, 3 fail, 0 error, 10 skipped. Failing: `test-timers-max-duration-warning.js`, `test-timers-timeout-to-interval.js`, `test-timers-unenroll-unref-interval.js`.
<!-- api-reference:end -->
