time.scm 466 B

123456789101112131415161718
  1. (define-module (lang elisp primitives time)
  2. #:use-module (lang elisp internals time)
  3. #:use-module (lang elisp internals fset)
  4. #:use-module (ice-9 optargs))
  5. (fset 'current-time
  6. (lambda ()
  7. (let ((now (current-time)))
  8. (list (ash now -16)
  9. (logand now (- (ash 1 16) 1))
  10. 0))))
  11. (fset 'format-time-string format-time-string)
  12. (fset 'current-time-string
  13. (lambda* (#:optional specified-time)
  14. (format-time-string "%a %b %e %T %Y" specified-time)))