pull/9/head
Matthew Butterick 11 years ago
parent e6bdb9fed5
commit 20d83be366

@ -7,17 +7,13 @@
(define current-cache (make-parameter #f)) (define current-cache (make-parameter #f))
(define (path-string->path path-string)
; (path-string? . -> . complete-path?)
(->complete-path (if (string? path-string) (string->path path-string) path-string)))
(define (make-cache) (define (make-cache)
; ( -> hash?) ; ( -> hash?)
(make-hash)) (make-hash))
(define (get-cache-hash path-string) (define (get-cache-hash path-string)
; (path-string? . -> . hash?) ; (path-string? . -> . hash?)
(hash-ref (current-cache) (path-string->path path-string))) (hash-ref (current-cache) (->complete-path path-string)))
(define (cache-ref path sym) (define (cache-ref path sym)
; (path? symbol? . -> . any/c) ; (path? symbol? . -> . any/c)
@ -27,7 +23,7 @@
; (path-string? symbol? . -> . any/c) ; (path-string? symbol? . -> . any/c)
(when (not (current-cache)) (error "cached-require: No cache set up.")) (when (not (current-cache)) (error "cached-require: No cache set up."))
(define path (path-string->path path-string)) (define path (->complete-path path-string))
(define (cache path) (define (cache path)
(dynamic-rerequire path) (dynamic-rerequire path)

@ -46,10 +46,7 @@
(date-hour date) ; am hours + noon hour (date-hour date) ; am hours + noon hour
(modulo (date-hour date) 12)) ; pm hours after noon hour (modulo (date-hour date) 12)) ; pm hours after noon hour
(date-minute date) (date-minute date)
(date-second date) (date-second date))))
)))
(string-append (string-join time-fields ":") (if (< (date-hour date) 12) "am" "pm"))) (string-append (string-join time-fields ":") (if (< (date-hour date) 12) "am" "pm")))
(define (make-debug-timestamp) (define (make-debug-timestamp)

Loading…
Cancel
Save