Subject: bug#27662: closed (Re: [bug#27662] [PATCH] base: Fix time-monotonic Guile issue.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 12 Jul 2017 17:06:01 +0000

Your bug report

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

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
27662: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27662
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#27662] [PATCH] base: Fix time-monotonic Guile issue.
From: Mathieu Othacehe <[email-masked]>
To: Ludovic Courtès <[email-masked]>
Cc: [email-masked]
Date: Wed, 12 Jul 2017 19:05:32 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Pushed thanks !

Subject: [PATCH] base: Fix time-monotonic Guile issue.
From: Mathieu Othacehe <[email-masked]>
To: [email-masked]
Cc: Mathieu Othacehe <[email-masked]>
Date: Wed, 12 Jul 2017 10:11:12 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

* 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