summaryrefslogtreecommitdiff
path: root/libguile/stime.c
diff options
context:
space:
mode:
authorGreg J. Badros <gjb@cs.washington.edu>2000-02-14 03:13:19 +0000
committerGreg J. Badros <gjb@cs.washington.edu>2000-02-14 03:13:19 +0000
commitb450f07086e27f6bb428a5d8e6f17fa997073c26 (patch)
tree3f37f79a9b5fc4ffaf20066debe1c01b3422139b /libguile/stime.c
parent92540145dd16d24881aad29ecf6cc79e76e97702 (diff)
* arbiters.c, eq.c, gc.c, guardians.c, list.c, ports.c, print.c,
regex-posix.c, scmsigs.c, stime.c, strings.c, variable.c, stime.c, strings.c, variable.c: Added lots of documentation, cleaned up some existing documentation. Occasionally changed formal params to match docs. Also folded an #ifdef into the inners of a primitive instead of having two copies of the primitive (`get-internal-real-time', from stime.c)
Diffstat (limited to 'libguile/stime.c')
-rw-r--r--libguile/stime.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/libguile/stime.c b/libguile/stime.c
index b28daab04..d6bcb14b5 100644
--- a/libguile/stime.c
+++ b/libguile/stime.c
@@ -126,14 +126,17 @@ long mytime()
extern int errno;
#ifdef HAVE_FTIME
-
struct timeb scm_your_base = {0};
+#else
+timet scm_your_base = 0;
+#endif
SCM_DEFINE (scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0,
(),
"Returns the number of time units since the interpreter was started.")
#define FUNC_NAME s_scm_get_internal_real_time
{
+#ifdef HAVE_FTIME
struct timeb time_buffer;
SCM tmp;
@@ -145,24 +148,12 @@ SCM_DEFINE (scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0,
SCM_MAKINUM (time_buffer.time)));
return scm_quotient (scm_product (tmp, SCM_MAKINUM (CLKTCK)),
SCM_MAKINUM (1000));
-}
-#undef FUNC_NAME
-
-
#else
-
-timet scm_your_base = 0;
-
-SCM_DEFINE (scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0,
- (),
- "")
-#define FUNC_NAME s_scm_get_internal_real_time
-{
return scm_long2num((time((timet*)0) - scm_your_base) * (int)CLKTCK);
+#endif /* HAVE_FTIME */
}
#undef FUNC_NAME
-#endif
#ifdef HAVE_TIMES
SCM_DEFINE (scm_times, "times", 0, 0, 0,