X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=guile18%2Flang%2Felisp%2Fprimitives%2Ftime.scm;fp=guile18%2Flang%2Felisp%2Fprimitives%2Ftime.scm;h=4b2c70c1a3ded5a1f69769f7bd9da55cae8db169;hb=139c38d9204dd07f6b235f83bae644faedbc63fd;hp=0000000000000000000000000000000000000000;hpb=652ed35a2013489d0a14fede6307cd2595abb2c4;p=lilypond.git diff --git a/guile18/lang/elisp/primitives/time.scm b/guile18/lang/elisp/primitives/time.scm new file mode 100644 index 0000000000..4b2c70c1a3 --- /dev/null +++ b/guile18/lang/elisp/primitives/time.scm @@ -0,0 +1,17 @@ +(define-module (lang elisp primitives time) + #:use-module (lang elisp internals time) + #:use-module (lang elisp internals fset) + #:use-module (ice-9 optargs)) + +(fset 'current-time + (lambda () + (let ((now (current-time))) + (list (ash now -16) + (logand now (- (ash 1 16) 1)) + 0)))) + +(fset 'format-time-string format-time-string) + +(fset 'current-time-string + (lambda* (#:optional specified-time) + (format-time-string "%a %b %e %T %Y" specified-time)))