GNU bug report logs - #26329
monotonic time not supplied by current-time

Previous Next

Package: guile;

Reported by: Zefram <zefram <at> fysh.org>

Date: Sat, 1 Apr 2017 11:19:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> igalia.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andy Wingo <wingo <at> igalia.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#26329: closed (monotonic time not supplied by current-time)
Date: Wed, 19 Apr 2017 13:11:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 19 Apr 2017 15:10:15 +0200
with message-id <87lgqwo85k.fsf <at> igalia.com>
and subject line Re: bug#26329: monotonic time not supplied by current-time
has caused the debbugs.gnu.org bug report #26329,
regarding monotonic time not supplied by current-time
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
26329: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26329
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Zefram <zefram <at> fysh.org>
To: bug-guile <at> gnu.org
Subject: monotonic time not supplied by current-time
Date: Sat, 1 Apr 2017 12:18:38 +0100
The SRFI-19 current-time function can return several flavours of the
current time:

scheme@(guile-user)> (use-modules (srfi srfi-19))
scheme@(guile-user)> (current-time time-utc)
$1 = #<time type: time-utc nanosecond: 727666000 second: 1491045256>
scheme@(guile-user)> (current-time time-tai)
$2 = #<time type: time-tai nanosecond: 414752000 second: 1491045294>
scheme@(guile-user)> (current-time time-monotonic)
$3 = #<time type: time-tai nanosecond: 814494000 second: 1491045297>

The last of these three is erroneous: a time structure of type
time-monotonic was requested and must be returned, but instead the
type is time-tai.  Although the implementation gives these two time
types numerically identical behaviour, it does treat them as nominally
distinct in other operations:

scheme@(guile-user)> (eqv? time-tai time-monotonic)
$4 = #f
scheme@(guile-user)> (julian-day->time-tai 2450000)
$5 = #<time type: time-tai nanosecond: 0 second: 813240029>
scheme@(guile-user)> (julian-day->time-monotonic 2450000)
$6 = #<time type: time-monotonic nanosecond: 0 second: 813240029>

-zefram


[Message part 3 (message/rfc822, inline)]
From: Andy Wingo <wingo <at> igalia.com>
To: Zefram <zefram <at> fysh.org>
Cc: 26329-done <at> debbugs.gnu.org
Subject: Re: bug#26329: monotonic time not supplied by current-time
Date: Wed, 19 Apr 2017 15:10:15 +0200
On Sat 01 Apr 2017 13:18, Zefram <zefram <at> fysh.org> writes:

> The SRFI-19 current-time function can return several flavours of the
> current time:
>
> scheme@(guile-user)> (use-modules (srfi srfi-19))
> scheme@(guile-user)> (current-time time-utc)
> $1 = #<time type: time-utc nanosecond: 727666000 second: 1491045256>
> scheme@(guile-user)> (current-time time-tai)
> $2 = #<time type: time-tai nanosecond: 414752000 second: 1491045294>
> scheme@(guile-user)> (current-time time-monotonic)
> $3 = #<time type: time-tai nanosecond: 814494000 second: 1491045297>
>
> The last of these three is erroneous: a time structure of type
> time-monotonic was requested and must be returned, but instead the
> type is time-tai.

Thanks for the report; fixed.  Patches welcome too.

Andy


This bug report was last modified 8 years and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.