anchor.diff:            (num-bodies (body-system-num-bodies system)))
         (display-particle-renderer renderer pos num-bodies :particle-sprites))))
   
  +(defun nbody-demo-measure-framerate (demo)
  +  (body-system-measure-framerate (nbody-demo-system demo)))
  +
   (defun nbody-demo-num-bodies (demo)
     (body-system-num-bodies (nbody-demo-system demo)))
  +
  +(defun nbody-demo-fps (demo)
  +  (body-system-fps (nbody-demo-system demo)))
   
   
   ;;;
  
positive.code: 
  (defun release-framerate-counter (counter)
    (destroy-timer (framerate-counter-timer counter)))
  
  (defmacro with-framerate-counter ((var) &body body)
    `(let ((,var (init-framerate-counter)))
       (unwind-protect (progn ,@body)
         (release-framerate-counter ,var))))
  
  (defun measure-framerate-counter (counter)
    (symbol-macrolet ((timer (framerate-counter-timer counter))
  
negative.code:     (values interactions-per-second gflops)))
  
  (let ((previous 0.0))
    (defun display-framerate (fps num-bodies)
      (when (/= fps previous)
        (setf previous fps)
        (multiple-value-bind (interactions-per-second gflops)
            (compute-pref-stats fps num-bodies 1)
          (let ((msg (format nil "CUDA N-Body (~A bodies): ~,1F fps | ~,1F BIPS | ~,1F GFLOP/s | single precision~%"
                             num-bodies fps interactions-per-second gflops)))
            (format t msg)
            (glut:set-window-title msg))))))
  
  
  ;;;
  ;;; Framerate counter
  ;;; * note that since a framerate counter uses CUDA event, it depends on
  ;;;   CUDA context
  ;;;
  
  (defstruct (framerate-counter (:constructor %make-framerate-counter))
  