 (def ^:dynamic graphite-port
   (Integer/valueOf (env :graphite-port "2003")))
 
-(def ^:dynamic graphite-post-interval
-  (Integer/valueOf (env :graphite-post-interval "60")))
-
-(def ^:dynamic graphite-post-unit
-  (TimeUnit/valueOf (env :graphite-post-unit "SECONDS")))
+(def ^:dynamic graphite-post-interval-seconds
+  (Integer/valueOf (env :graphite-post-interval-seconds "60")))
 
 (def ^:dynamic graphite-prefix
   (env :graphite-prefix))

  {:graphite-enabled? graphite-enabled?
   :graphite-host graphite-host
   :graphite-port graphite-port
   :graphite-post-interval graphite-post-interval
   :graphite-post-unit graphite-post-unit
   :graphite-prefix graphite-prefix})

(defn read-file-to-properties

(defn start-graphite-reporting
  [& [options]]
  (instrument-jvm)
  (let [{:keys [graphite-enabled? graphite-host graphite-port
                graphite-post-interval-seconds graphite-prefix]} (merge graphite-defaults options)
        graphite-reporter (graphite/reporter {:host graphite-host
                                              :port graphite-port
                                              :prefix graphite-prefix})]
    (when graphite-enabled?
      (graphite/start graphite-reporter graphite-post-interval-seconds))))

(def version
  (memoize
