Function roblox::function::delay [−][src]
pub fn delay<CB>(delay_time: f64, callback: CB) where
CB: FnMut(), Expand description
Equivalent to void delay(number delayTime, function callback) in Luau.
Schedules a function to be executed after delay_time seconds have passed,
without yielding the current thread. This function allows multiple Lua
threads to be executed in parallel from the same stack. The delay will have
a minimum duration of 29 milliseconds, but this minimum may be higher
depending on the target framerate and various throttling conditions. If the
delay_time parameter is not specified, the minimum duration will be used.