Implement CURRENT-SECOND for R7RS.
authorChris Hanson <org/chris-hanson/cph>
Mon, 14 May 2018 03:06:41 +0000 (20:06 -0700)
committerChris Hanson <org/chris-hanson/cph>
Mon, 14 May 2018 03:06:41 +0000 (20:06 -0700)
src/runtime/datime.scm
src/runtime/runtime.pkg

index 2cdeb9afc631c605ae282f15e098de87820730d7..f3e9d13e4d4fe7577955a72ecfbd72e94181febf 100644 (file)
@@ -166,6 +166,9 @@ USA.
 
 (define epoch 2208988800)
 
+(define (current-second)
+  (exact->inexact ((ucode-primitive encoded-time 0))))
+
 (define (local-decoded-time)
   (universal-time->local-decoded-time (get-universal-time)))
 
index 327546925a4b10364598bf5ee97fb84ff7aa2f77..c27f5222994746f01824135f524776dff947ad39 100644 (file)
@@ -1650,6 +1650,7 @@ USA.
          ctime-string->decoded-time
          ctime-string->file-time
          ctime-string->universal-time
+         current-second                ;R7RS
          day-of-week/long-string
          day-of-week/short-string
          decoded-time->ctime-string