Observation:

  $ ./s7
  λ (current-second)
  0
  λ (current-second) ; about a minute later
  0

The definition in s7:

  (define (current-second) (floor (*s7* 'cpu-time)))

Executing `(*s7* 'cpu-time)' about 1 second apart:

  $ ./s7
  λ (*s7* 'cpu-time)
  0.009856
  λ (*s7* 'cpu-time)
  0.010111
  λ (*s7* 'cpu-time)
  0.010273

Configuration:

  macOS 13.0.1 (22A400), M1 CPU

Guile:

scheme@(guile-user)> (import (scheme time))
scheme@(guile-user)> (current-second)
$1 = 1669820061.212179
scheme@(guile-user)> (current-second) ; about 3 seconds later
$2 = 1669820064.625196

Rudy
-- 
"Programming reliably -- must be an activity of an undeniably
mathematical nature […] You see, mathematics is about thinking, and
doing mathematics is always trying to think as well as possible."
-- Edsger W. Dijkstra, 1981

Rudolf Adamkovič <salu...@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia

_______________________________________________
Cmdist mailing list
Cmdist@ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to