# مرجع واجهة ⁦node:timers⁩

تصدّر ⁦`node:timers`⁩ مؤقتات دوال الاستدعاء: ⁦`setTimeout` / `clearTimeout`⁩،
و⁦`setInterval` / `clearInterval`⁩، و⁦`setImmediate`⁩ /
⁦`clearImmediate`⁩. وهي توفر الواجهة نفسها التي توفرها متغيرات المؤقتات العامة، لكنها ليست
كائنات دوال ⁦JavaScript⁩ نفسها. ولا يُكشف التابعان القديمان ⁦`active()`⁩ و⁦`unenroll()`⁩.

## ⁦node:timers/promises⁩

| الصادر | الغرض |
|---|---|
| `setTimeout(delay?, value?, options?)` | الحل بالقيمة ⁦`value`⁩ بعد التأخير. |
| `setImmediate(value?, options?)` | الحل في دورة فورية. |
| `setInterval(delay?, value?, options?)` | إنتاج مكرِّر غير متزامن. |
| `scheduler` | يوفر ⁦`wait()`⁩ و⁦`yield()`⁩. |

تقبل مؤقتات ⁦Promise⁩ إشارة ⁦`AbortSignal`⁩ وترفض بـ ⁦`AbortError`⁩ عند
إلغائها. وتُبقي مؤقتات دوال الاستدعاء و⁦Promise⁩ المعلّقة عملية ⁦`elide run`⁩
المستقلة حيّة إلى أن تكتمل.

## انظر أيضًا

- [متغيرات المؤقتات العامة](/docs/api-html-timers)
- [واجهة المؤقتات في ⁦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 -->
