From 6696a0b5fcb1b17895285d80d9636defb2df3f9d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 10 Apr 2024 14:49:03 -0400 Subject: Sloppily refactor into modules. --- strigoform/time.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 strigoform/time.scm (limited to 'strigoform/time.scm') diff --git a/strigoform/time.scm b/strigoform/time.scm new file mode 100644 index 0000000..00971a0 --- /dev/null +++ b/strigoform/time.scm @@ -0,0 +1,11 @@ +(library (strigoform time) + (export current-time) + (import (scheme base) + (scheme time)) + + (define %jps + (cond-expand + (guile-vm 0.0) + (hoot (inexact (jiffies-per-second))))) + (define (current-time) + (/ (inexact (current-jiffy)) %jps))) -- cgit v1.2.3