ui.util.setInterval
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
به طور مکرر یک تابع را با تاخیر زمانی ثابت بین هر تماس فراخوانی می کند.
کلیدی را برمیگرداند که میتوان آن را به ui.util.clearTimeout ارسال کرد تا مهلت زمانی حذف شود.
استفاده | برمی گرداند | ui.util.setInterval(func, delay) | شماره |
استدلال | تایپ کنید | جزئیات | func | تابع | تابعی که بعد از تاخیر مشخص شده اجرا می شود. |
delay | شماره | زمان، بر حسب میلی ثانیه (هزارم ثانیه)، تایمر باید بین اجرای تابع مشخص شده به تاخیر بیفتد. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003e\u003ccode\u003eui.util.setInterval\u003c/code\u003e repeatedly executes a provided function at a fixed time interval.\u003c/p\u003e\n"],["\u003cp\u003eIt returns a unique key that can be used with \u003ccode\u003eui.util.clearTimeout\u003c/code\u003e to cancel the interval timer.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edelay\u003c/code\u003e argument specifies the time in milliseconds between each function execution.\u003c/p\u003e\n"]]],["The core content describes the `ui.util.setInterval` function, which repeatedly executes a provided function (`func`) at a specified time interval (`delay`, in milliseconds). It returns a numerical key. This key is then usable with `ui.util.clearTimeout` to cancel the recurring function calls. The function establishes a recurring timer with the specified delay between executions.\n"],null,["# ui.util.setInterval\n\n\u003cbr /\u003e\n\nRepeatedly calls a function with a fixed time delay between each call.\n\n\u003cbr /\u003e\n\nReturns a key that can be passed to ui.util.clearTimeout to remove the timeout.\n\n| Usage | Returns |\n|------------------------------------|---------|\n| `ui.util.setInterval(func, delay)` | Number |\n\n| Argument | Type | Details |\n|----------|----------|------------------------------------------------------------------------------------------------------------------------------|\n| `func` | Function | The function to run after the specified delay. |\n| `delay` | Number | The time, in milliseconds (thousandths of a second), the timer should delay in between executions of the specified function. |"]]