我怎样才能正确执行类似sleep
功能的使用getTimer()
?我需要每 15 秒执行一次操作。下面的代码不起作用。我mtasc
在 Linux 上用编译器编译它。
class Tuto
{
static var lastMsg = 0;
static var msgInt = 15000;
static function main(mc)
{
if(getTimer() > lastMsg + msgInt)
{
trace("something");
lastMsg = getTimer();
}
}
}