moss.kernel
Class MTimer

java.lang.Object
  extended by moss.kernel.MTimer

public class MTimer
extends java.lang.Object

this class is used to provide process timeouts in MOSS. The implementation is somewhat grim, but without a mechanism for absolute time in milli-seconds, the one-thread implementation would suffer incremental-error problems (Java's timeout is "more or less" ...)


Constructor Summary
MTimer()
           
 
Method Summary
static void add_to_timer_queue(MProcess p, long millis)
          called to add a process to the timer queue
static boolean del_from_timer_queue(MProcess p)
          called to remove a process from the timer queue
static void init_timer()
          called to initialise the timer mechanism
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MTimer

public MTimer()
Method Detail

init_timer

public static void init_timer()
called to initialise the timer mechanism


add_to_timer_queue

public static void add_to_timer_queue(MProcess p,
                                      long millis)
called to add a process to the timer queue

Parameters:
p - process to add
millis - timeout in milli-seconds

del_from_timer_queue

public static boolean del_from_timer_queue(MProcess p)
called to remove a process from the timer queue

Parameters:
p - process to remove
Returns:
true if the timeout happened, false otherwise