 
 (defonce query-window (reagent/atom "1d"))
 
-(defn periodic-event-channel [ interval-ms ]
-  (let [channel (chan)
-        put-now #(put! channel {:msg-type :timestamp :t (time/now)})]
-    (put-now)
-    (js/setInterval put-now interval-ms)
-    channel))
-
-(defonce time-event-channel (periodic-event-channel 15000))
+(defn time-atom [ interval-ms ]
+  (let [ new-atom (reagent/atom (time/now)) ]
+    (js/setInterval #(reset! new-atom (time/now)) interval-ms)
+    new-atom))
+
+(defonce current-time (time-atom 5000))
 
 (defn range-ending-at [ end-t window-seconds ]
   (let [begin-t (time/minus end-t (time/seconds window-seconds))]


(defn end-edit [ text state ]
  (when (parse-query-window text)
    (put! time-event-channel {:msg-type :query-window :window-spec text})
    (reset! query-window text)))

(defn input-field [ initial-text text-valid? on-enter ]

                             :request-t request-t
                             :response-t (time/now)}
                            query-range)))))

(defn series-tsplot-view [ series series-data series-range ]
  (let [dom-node (reagent/atom nil)]
