          (@state :burst-init-time)))))
 
 (defn elapsed-time [state]
-  (if (state :start-time) (- (clock-ms) (state :start-time)) 0))
+  (if (state :start-time) (- (jvm-time-ms) (state :start-time)) 0))
 
 ;; image metadata
 

(defn store-new-z-reference []
  (let [z-drive (@state :default-z-drive)]
    (when (and (or (not (core isContinuousFocusEnabled))
                   (core isContinuousFocusDrive z-drive)))
      (state-assoc! :reference-z (get-z-stage-position z-drive)))))

;; startup and shutdown


;; time

(defn jvm-time-ms []
  (quot (System/nanoTime) 1000000))

(defn compute-time-from-core [tags]
