I need to asynchronously delay execution of a function in Lua by X milliseconds. Can this be done?
Given a simple JavaScript example:
setTimeout(function() {
alert('Hello world!');
}, 5000);
What's the Lua equivalent? Coroutines look like they may help, but I'm not sure.