[noctool-cvs] CVS source

jprewett jprewett at common-lisp.net
Tue Jul 22 18:54:46 UTC 2008


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

Modified Files:
	graphing.lisp 
Log Message:

added last-updated slot to base-graph class

added :AFTER method for add-value to update the last-updated slot with the current time.



--- /project/noctool/cvsroot/source/graphing.lisp	2008/07/03 07:30:24	1.6
+++ /project/noctool/cvsroot/source/graphing.lisp	2008/07/22 18:54:45	1.7
@@ -12,7 +12,8 @@
    (medium-ix :accessor medium-ix :initarg :medium-ix)
    (long-ix :accessor long-ix :initarg :long-ix)
    (interval :reader interval :initarg :interval)
-   (proxies :accessor proxies :initform nil)) 
+   (proxies :accessor proxies :initform nil)
+   (last-updated :accessor last-updated :initform NIL))
   (:default-initargs :short-ix 0 :medium-ix 0 :long-ix 0 :id (gensym "GRAPH-")))
 
 (defclass gauge-graph (base-graph)
@@ -117,6 +118,8 @@
     (loop for proxy in (proxies graph)
 	  do (noctool-network:graph-update proxy id (id graph) value))))
 
+(defmethod add-value :after (graph value)
+  (setf (last-updated graph) (get-universal-time)))
 
 (defmethod add-medium ((graph meter-graph))
   (when (zerop (mod (medium-ix graph) 12))




More information about the noctool-cvs mailing list