![]() ![]() ![]() Print(os.clock() - scheduledTime) -> 2.038702Ī duration of zero will result in the thread or function being resumed on the next step. Since the actual delay time may vary it can be calculated by passing the current time as an argument. Any additional arguments are passed to the thread or function being resumed. The thread is resumed with built-in error handling and support for other engine features. Takes a thread or function and schedules it for resumption after the given amount of time has elapsed on the next Heartbeat step. fer is an improved version of spawn which schedules a thread to be resumed as soon as possible (but not immediately) without any throttling. You should typically use this when you want similar behavior to task.spawn but don’t care about the thread running immediately. Additional arguments are passed to the thread or function being resumed. Takes a thread or function and defers it until the next resumption cycle at which point it is resumed with the engine’s scheduler. We recommend you use this method where you would otherwise use fastSpawn. Task.spawn is based on the fastSpawn pattern rather than being a replacement for spawn. This is particularly useful when calling a function which may yield when iterating over a set of objects: local function playerAdded(player)įor _, player in ipairs(Players:GetPlayers()) do ![]() Takes a thread or function and resumes it immediately through the engine’s scheduler. It features a number of new methods as well as some improvements to existing methods. The task library allows you to talk directly with our engine’s task scheduler to manage and schedule code. We have just enabled a brand new library that you can use in your projects. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |