   (:require [clj-http.client :as client])
   (:import  [java.util.concurrent Executors]
             [javax.swing JFrame]
+            [java.util TimerTask Timer]
             [processing.core PApplet]))
 
 ; Size of Rectangles

       (binding [*applet* this]
       (on-draw this)))))

(defn initialize-graphics [width height]
  (let [pb-applet   (create-pb-applet width height)
        swing-frame (JFrame. "Graphical HTTP Tester")]
    (.init pb-applet)
      (doto swing-frame
        (.setDefaultCloseOperation JFrame/EXIT_ON_CLOSE)

        (.pack)
        (.show))))

(defn -main [mode concurrencyArg reqsArg url]
  (let [requests    (Integer. reqsArg)
        concurrency (Integer. concurrencyArg)
        width       (* gfx-scale requests)
        height      (* gfx-scale concurrency)]
    (initialize-console)
    (cond (not= mode "console")
      (initialize-graphics width height))
    (run-requests requests concurrency url)))
