[noctool-cvs] CVS source

imattsson imattsson at common-lisp.net
Wed Aug 13 05:58:43 UTC 2008


Update of /project/noctool/cvsroot/source
In directory clnet:/tmp/cvs-serv14862

Modified Files:
	classes.lisp 
Log Message:
IM

Added an ENQUEUE generic function and methods for EQUIPMENT and MONITOR.
The idea is that the monitors get enqueued with a random wait time.


--- /project/noctool/cvsroot/source/classes.lisp	2008/07/09 14:40:07	1.11
+++ /project/noctool/cvsroot/source/classes.lisp	2008/08/13 05:58:43	1.12
@@ -248,3 +248,11 @@
   (:default-initargs :display-objects nil))
 
 
+(defgeneric initial-enqueue (object))
+(defmethod initial-enqueue ((object equipment))
+  (loop for mon in (monitors object)
+	do (initial-enqueue mon)))
+(defmethod initial-enqueue ((object monitor))
+  (noctool-scheduler:schedule object (+ 1
+					(get-universal-time)
+					(random (interval mon)))))




More information about the noctool-cvs mailing list