| 函数名: | 定时计数函数 |
| 调 用: | gma.timer(name, dt, max_count, [cleanup]) |
| 参 数: | 第一个参数为函数名:定时执行的函数; 第二个参数为数字:每多少秒执行一次; 第三个参数为数字:执行多少次; 第四个参数为cleanup函数(可选) |
| 返回值: | 无 |
| 结 果: | 无 |
| 备 注: | 无 |
例子:
- 每一秒运行一次 test_callback 函数,共运行10次,最后运行 Cleanup 退出程序
function Start()
gma.timer(test_callback,1,10,Cleanup);
end
function Cleanup()
gma.echo("Cleanup called");
gma.gui.progress.stop(test_callback);
end
return Start;
