Subject: [PATCH] base: Fix time-monotonic Guile issue.

From: Mathieu Othacehe <[email-masked]>
Date: Wed, 12 Jul 2017 10:11:12 +0200

* src/cuirass/base.scm: Replace time-monotonic with time-tai with
  Guile 2.2, to avoid wrong evaluation durations.
---
 src/cuirass/base.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index 5e0cb0d..d0e77d9 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -45,6 +45,13 @@
             %package-cachedir
             %use-substitutes?))
 
+(cond-expand
+  (guile-2.2
+   ;; Guile 2.2.2 has a bug whereby 'time-monotonic' objects have seconds and
+   ;; nanoseconds swapped (fixed in Guile commit 886ac3e).  Work around it.
+   (define time-monotonic time-tai))
+  (else #t))
+
 (define %use-substitutes?
   ;; Define whether to use substitutes
   (make-parameter #f))
-- 
2.13.1