[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-335-g40e2a
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-335-g40e2a31 |
Date: |
Tue, 09 Apr 2013 20:12:45 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=40e2a31d8710eddbf564fa11d14a6af57e504448
The branch, stable-2.0 has been updated
via 40e2a31d8710eddbf564fa11d14a6af57e504448 (commit)
from 32cec09d136060e02dfa28d65f2cb19028706652 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 40e2a31d8710eddbf564fa11d14a6af57e504448
Author: Andy Wingo <address@hidden>
Date: Tue Apr 9 22:12:28 2013 +0200
fix stime patch for HAVE_TIMES removal
* libguile/stime.c (scm_init_stime): Fix previous patch. At this point
in the source, we definitely have a run-time function, but don't
necessarily have a real-time function.
-----------------------------------------------------------------------
Summary of changes:
libguile/stime.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/libguile/stime.c b/libguile/stime.c
index 4e1f25c..7c0ed24 100644
--- a/libguile/stime.c
+++ b/libguile/stime.c
@@ -181,6 +181,14 @@ get_internal_run_time_times (void)
* TIME_UNITS_PER_SECOND / ticks_per_second;
}
+static timet fallback_real_time_base;
+static long
+get_internal_real_time_fallback (void)
+{
+ return time_from_seconds_and_nanoseconds
+ ((long) time (NULL) - fallback_real_time_base, 0);
+}
+
SCM_DEFINE (scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0,
(),
@@ -865,9 +873,12 @@ scm_init_stime()
if (!get_internal_run_time)
get_internal_run_time = get_internal_run_time_times;
- /* If we don't have a run-time timer, use real-time. */
- if (!get_internal_run_time)
- get_internal_run_time = get_internal_real_time;
+ if (!get_internal_real_time)
+ /* No POSIX timers, gettimeofday doesn't work... badness! */
+ {
+ fallback_real_time_base = time (NULL);
+ get_internal_real_time = get_internal_real_time_fallback;
+ }
scm_add_feature ("current-time");
#include "libguile/stime.x"
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-335-g40e2a31,
Andy Wingo <=