Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 0cb43700a3b29fb2b2f64f10cb788946e3b3abbd Sun Ning committed Jun 30, 2012
Showing with 56 additions and 0 deletions.
  1. +10 −0 .gitignore
  2. +13 −0 README.md
  3. +3 −0 doc/intro.md
  4. +7 −0 project.clj
  5. +16 −0 src/timing/core.clj
  6. +7 −0 test/timing/core_test.clj
@@ -0,0 +1,10 @@
+/target
+/lib
+/classes
+/checkouts
+pom.xml
+*.jar
+*.class
+.lein-deps-sum
+.lein-failures
+.lein-plugins
@@ -0,0 +1,13 @@
+# timing
+
+A Clojure library designed to ... well, that part is up to you.
+
+## Usage
+
+FIXME
+
+## License
+
+Copyright © 2012 FIXME
+
+Distributed under the Eclipse Public License, the same as Clojure.
@@ -0,0 +1,3 @@
+# Introduction to timing
+
+TODO: write [great documentation](http://jacobian.org/writing/great-documentation/what-to-write/)
@@ -0,0 +1,7 @@
+(defproject timing "0.1.0-SNAPSHOT"
+ :description "A simple timing library for clojure"
+ :url "http://github.com/sunng87/timing"
+ :license {:name "Eclipse Public License"
+ :url "http://www.eclipse.org/legal/epl-v10.html"}
+ :dependencies [[org.clojure/clojure "1.4.0"]
+ [org.perf4j/perf4j "0.9.16"]])
@@ -0,0 +1,16 @@
+(ns timing.core
+ (:import [org.perf4j StopWatch LoggingStopWatch]))
+
+(defmacro defn-watched [name argvec & body]
+ `(defn ~name argvec
+ (let [watch# (LoggingStopWatch. ~name)
+ result# (do ~@body)]
+ (.stop watch#)
+ result#)))
+
+(defn watched [func]
+ )
+
+(defn wrap-watched [d]
+ )
+
@@ -0,0 +1,7 @@
+(ns timing.core-test
+ (:use clojure.test
+ timing.core))
+
+(deftest a-test
+ (testing "FIXME, I fail."
+ (is (= 0 1))))

0 comments on commit 0cb4370

Please sign in to comment.