mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
SRFI-19 current-time-monotonic returns time of right type
* module/srfi/srfi-19.scm (current-time-monotonic): Actually return a time with the correct type. Fixes #26329.
This commit is contained in:
parent
6010792787
commit
b11e2922c3
1 changed files with 6 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
;;; srfi-19.scm --- Time/Date Library
|
;;; srfi-19.scm --- Time/Date Library
|
||||||
|
|
||||||
;; Copyright (C) 2001-2003, 2005-2011, 2014, 2016
|
;; Copyright (C) 2001-2003, 2005-2011, 2014, 2016-2017
|
||||||
;; Free Software Foundation, Inc.
|
;; Free Software Foundation, Inc.
|
||||||
;;
|
;;
|
||||||
;; This library is free software; you can redistribute it and/or
|
;; This library is free software; you can redistribute it and/or
|
||||||
|
@ -333,8 +333,11 @@
|
||||||
;; of course.
|
;; of course.
|
||||||
|
|
||||||
(define (current-time-monotonic)
|
(define (current-time-monotonic)
|
||||||
;; Resolution is microseconds.
|
;; Guile monotonic and TAI times are the same.
|
||||||
(current-time-tai))
|
(let ((tai (current-time-tai)))
|
||||||
|
(make-time time-monotonic
|
||||||
|
(time-second tai)
|
||||||
|
(time-nanosecond tai))))
|
||||||
|
|
||||||
(define (current-time-thread)
|
(define (current-time-thread)
|
||||||
(time-error 'current-time 'unsupported-clock-type 'time-thread))
|
(time-error 'current-time 'unsupported-clock-type 'time-thread))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue