Permalink
Browse files

Remove useless space in README.md.

  • Loading branch information...
1 parent 1c73010 commit b98d9b615e4c4398bd2374fef0bbfea38b93e9bb @Ruiyun committed Jul 16, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 README.md
View
@@ -30,34 +30,34 @@ Quick tutorial
You can simply start a period task with every 5 seconds immediately like this:
```clojure
- (use 'ruiyun.tools.timer)
- (run-task! #(println "Say hello every 5 seconds.") :period 5000)
+(use 'ruiyun.tools.timer)
+(run-task! #(println "Say hello every 5 seconds.") :period 5000)
```
If you want delay the first run with 2 seconds:
```clojure
- (run-task! #(println \"Say hello after 2 seconds.\") :dealy 2000)
+(run-task! #(println \"Say hello after 2 seconds.\") :dealy 2000)
```
Use this if you want to execute a task at an absolute time:
```clojure
- (run-task! #(println "Say hello at 2013-01-01T00:00:00 in beijing.") :at #inst "2013-01-01T00:00:00+08:00")
+(run-task! #(println "Say hello at 2013-01-01T00:00:00 in beijing.") :at #inst "2013-01-01T00:00:00+08:00")
```
And, you can use the same timer in more than one tasks:
```clojure
- (def greeting-timer (timer \"The timer for greeting\"))
- (run-task! #(println \"Say hello after 2 seconds.\") :dealy 2000 :by greeting-timer)
- (run-task! #(println \"Say hello every 5 seconds.\") :period 5000 :by greeting-timer)
+(def greeting-timer (timer \"The timer for greeting\"))
+(run-task! #(println \"Say hello after 2 seconds.\") :dealy 2000 :by greeting-timer)
+(run-task! #(println \"Say hello every 5 seconds.\") :period 5000 :by greeting-timer)
```
Finally, you can cancel a timer's tasks:
```clojure
- (cancel! greeting-timer)
+(cancel! greeting-timer)
```
Documentation

0 comments on commit b98d9b6

Please sign in to comment.