]> git.donarmstrong.com Git - lilypond.git/blobdiff - guile18/lang/elisp/primitives/time.scm
Import guile-1.8 as multiple upstream tarball component
[lilypond.git] / guile18 / lang / elisp / primitives / time.scm
diff --git a/guile18/lang/elisp/primitives/time.scm b/guile18/lang/elisp/primitives/time.scm
new file mode 100644 (file)
index 0000000..4b2c70c
--- /dev/null
@@ -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)))