Skip to content

Commit

Permalink
PERF/circadian.el: use memoized sunset & sunrise times (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
LemonBreezes authored Oct 27, 2023
1 parent 52e336d commit b3bb940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions circadian.el
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@
(let ((sunrise (circadian-sunrise)))
(if (equal sunrise "not")
(error "Could not get valid sunset time — check your time zone settings"))
(circadian-sunrise)))
sunrise))
((cl-equalp input :sunset)
(let ((sunset (circadian-sunset)))
(if (equal sunset "on")
(error "Could not get valid sunset time — check your time zone settings"))
(circadian-sunset)))
sunset))
((stringp input) (circadian--string-to-time input))))

;;;###autoload
Expand Down

0 comments on commit b3bb940

Please sign in to comment.