X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Forg%2Fibex%2Futil%2FScheduler.java;h=e4c85fa9a8fab99b028cd58d1c468a162e8afda0;hb=refs%2Ftags%2FRC4;hp=09487bd5ff2076d6a73b1a40aa0f1842a35f590a;hpb=4daeeb4119b901d53b44913c86f8af3ce67db925;p=org.ibex.core.git diff --git a/src/org/ibex/util/Scheduler.java b/src/org/ibex/util/Scheduler.java index 09487bd..e4c85fa 100644 --- a/src/org/ibex/util/Scheduler.java +++ b/src/org/ibex/util/Scheduler.java @@ -1,10 +1,12 @@ // Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL] -package org.ibex; +package org.ibex.util; import java.io.IOException; import org.ibex.js.*; import org.ibex.util.*; +import org.ibex.graphics.*; +import org.ibex.plat.*; /** Implements cooperative multitasking */ public class Scheduler { @@ -12,7 +14,6 @@ public class Scheduler { // Public API Exposed to org.ibex ///////////////////////////////////////////////// private static Scheduler singleton; - public static interface Task { public abstract void perform() throws IOException, JSExn; } public static void add(Task t) { Log.debug(Scheduler.class, "scheduling " + t); Scheduler.runnable.append(t); } public static void init() { if (singleton == null) (singleton = Platform.getScheduler()).run(); } @@ -52,7 +53,7 @@ public class Scheduler { * Surface.renderAll() more often than that if it so chooses. */ public void run() { defaultRun(); } - protected Scheduler() { } + public Scheduler() { } // Default Implementation //////////////////////////////////////////////////////