(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 builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |