diff --git a/README.adoc b/README.adoc index 38d15a5..68c9008 100644 --- a/README.adoc +++ b/README.adoc @@ -94,6 +94,15 @@ To generate the sequence of times, you'll need to seed the call to `periodic-seq (Period/ofDays 1)) ---- +For example, to say hello once per second: +[source,clojure] +---- +(chime/chime-at (chime/periodic-seq (Instant/now) (Duration/ofSeconds 1)) + ;; note that the function needs to take an argument. + (fn [time] + (println "hello"))) +---- + === Complex schedules Because there is no scheduling DSL included with Chime, the sorts of schedules that you can achieve are not limited to the scope of the DSL.