Nicolas Cannasse 19 年之前
父节点
当前提交
7e1d199e9c
共有 1 个文件被更改,包括 19 次插入0 次删除
  1. 19 0
      std/flash/Timer.hx

+ 19 - 0
std/flash/Timer.hx

@@ -0,0 +1,19 @@
+package flash;
+
+class Timer {
+
+	private var id : Int;
+
+	public function new( time : Int ) {
+		id = untyped _global.setInterval(this,"run",time);
+	}
+
+	public function run() {
+	}
+
+	public function stop() {
+		untyped _global.clearInterval(id);
+		id = null;
+	}
+
+}