summaryrefslogtreecommitdiff
path: root/strigoform/time.scm
diff options
context:
space:
mode:
Diffstat (limited to 'strigoform/time.scm')
-rw-r--r--strigoform/time.scm11
1 files changed, 11 insertions, 0 deletions
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)))