R2DeltaSquared

    • Common Lisp Code to Find Swatch Internet time.

      • 01/20/12
      • 5:41PM
      ; Finds the internet time, this time with an entry point and
      ; a nice string formatter. 
      (defun beat ()
          (multiple-value-bind (beat)
              (round
                  (multiple-value-bind (s m h) (get-decoded-time)
                      (/
                          (+ s (* 60 m) (* 3600 (+ 1 h)))
                          86.4)))
          (mod beat 1000)))
      
      (defun main ()
          (format t "@ ~D~%" (beat)))
      ; #comon_lisp #swatch_internet_time #lisp