Liking cljdoc? Tell your friends :D

java-time.clock


*clock*clj

source

makeclj

(make f)
source

with-clockcljmacro

(with-clock c & forms)

Executes the given forms in the scope of the provided clock.

All the temporal entities that get created without parameters will inherit their values from the clock:

(with-clock (system-clock "Europe/London") (zone-id)) => #<java.time.ZoneRegion Europe/London>

Executes the given `forms` in the scope of the provided `clock`.

All the temporal entities that get created without parameters will inherit
their values from the clock:

  (with-clock (system-clock "Europe/London")
    (zone-id))
  => #<java.time.ZoneRegion Europe/London>
sourceraw docstring

with-clock-fnclj

(with-clock-fn c f)

Executes the given function in the scope of the provided clock. All the temporal entities that get created without parameters will inherit their values from the clock.

Executes the given function in the scope of the provided clock. All the
temporal entities that get created without parameters will inherit their
values from the clock.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close