(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>
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close