diff --git a/collects/scribblings/reference/numbers.scrbl b/collects/scribblings/reference/numbers.scrbl index 0ea020bffa..34ef4bc855 100644 --- a/collects/scribblings/reference/numbers.scrbl +++ b/collects/scribblings/reference/numbers.scrbl @@ -60,7 +60,7 @@ cases where IEEE provides no specification (e.g., @scheme[(angle +inf.0+inf.0)]), the result corresponds to the limit approaching infinity, or @scheme[+nan.0] if no such limit exists. -A @pidefterm{fixnum} is an exact integer whose two's complement +A @deftech{fixnum} is an exact integer whose two's complement representation fit into 31 bits on a 32-bit platform or 63 bits on a 64-bit platform. Two fixnums that are @scheme[=] are also the same according to @scheme[eq?]. Otherwise, the result of @scheme[eq?] diff --git a/collects/scribblings/reference/time.scrbl b/collects/scribblings/reference/time.scrbl index 7f4c935325..09c0516439 100644 --- a/collects/scribblings/reference/time.scrbl +++ b/collects/scribblings/reference/time.scrbl @@ -56,36 +56,35 @@ especially on Unix platforms; consult the system documentation @defproc[(current-milliseconds) exact-integer?]{ -Returns the current ``time'' in fixnum milliseconds (possibly +Returns the current ``time'' in @tech{fixnum} milliseconds (possibly negative). This time is based on a platform-specific starting date or -on the machine's startup time. Since the result is a fixnum, the value -increases only over a limited (though reasonably long) time.} +on the machine's startup time. Since the result is a @tech{fixnum}, +the value increases only over a limited (though reasonably long) +time.} @defproc[(current-inexact-milliseconds) real?]{ -Returns the current ``time'' in positive milliseconds, not necessarily -an integer. This time is based on a platform-specific starting date or -on the machine's startup time, but it never decreases (until the -machine is turned off).} +Like @scheme[current-milliseconds], but the result never decreases +(until the machine is turned off).} @defproc[(current-process-milliseconds) exact-integer?]{ -Returns the amount of processor time in fixnum milliseconds that has -been consumed by the Scheme process on the underlying operating -system. (Under @|AllUnix|, this includes both user and system time.) -The precision of the result is platform-specific, and since the result -is a fixnum, the value increases only over a limited (though -reasonably long) time.} +Returns the amount of processor time in @tech{fixnum} milliseconds +that has been consumed by the Scheme process on the underlying +operating system. (Under @|AllUnix|, this includes both user and +system time.) The precision of the result is platform-specific, and +since the result is a @tech{fixnum}, the value increases only over a +limited (though reasonably long) time.} @defproc[(current-gc-milliseconds) exact-integer?]{ -Returns the amount of processor time in fixnum milliseconds that has -been consumed by Scheme's garbage collection so far. This time is a -portion of the time reported by -@scheme[(current-process-milliseconds)].} +Returns the amount of processor time in @tech{fixnum} milliseconds +that has been consumed by Scheme's garbage collection so far. This +time is a portion of the time reported by +@scheme[(current-process-milliseconds)], and is similarly limited.} @defproc[(time-apply [proc procedure?] diff --git a/src/mzscheme/src/fun.c b/src/mzscheme/src/fun.c index 4a906d1290..d28b2db85c 100644 --- a/src/mzscheme/src/fun.c +++ b/src/mzscheme/src/fun.c @@ -54,6 +54,7 @@ # include # include # include +# include # endif /* USE_GETRUSAGE */ # ifdef USE_SYSCALL_GETRUSAGE # include @@ -7473,7 +7474,10 @@ long scheme_get_process_milliseconds(void) struct rusage use; long s, u; - getrusage(RUSAGE_SELF, &use); + do { + if (!getrusage(RUSAGE_SELF, &use)) + break; + } while (errno == EINTR); s = use.ru_utime.tv_sec + use.ru_stime.tv_sec; u = use.ru_utime.tv_usec + use.ru_stime.tv_usec;