fix accidental disabling of thread-specific process-milliseconds
This commit is contained in:
parent
d512a4a9c1
commit
b15aea28c2
|
@ -1525,6 +1525,15 @@
|
|||
(for ([i 1000])
|
||||
(thread (make-keyword-procedure (lambda (x y) '()))))
|
||||
|
||||
;; --------------------
|
||||
;; Make sure that thread time accounting works:
|
||||
|
||||
(let ([t (thread (λ () (let loop () (loop))))])
|
||||
(sleep 1)
|
||||
(define s (current-process-milliseconds t))
|
||||
(kill-thread t)
|
||||
(test #t positive? s))
|
||||
|
||||
; --------------------
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -2722,7 +2722,7 @@ static void do_swap_thread()
|
|||
|
||||
{
|
||||
intptr_t cpm;
|
||||
cpm = 0; // scheme_get_process_milliseconds();
|
||||
cpm = scheme_get_process_milliseconds();
|
||||
scheme_current_thread->current_start_process_msec = cpm;
|
||||
}
|
||||
|
||||
|
@ -2735,7 +2735,7 @@ static void do_swap_thread()
|
|||
|
||||
{
|
||||
intptr_t cpm;
|
||||
cpm = 0; // scheme_get_process_milliseconds();
|
||||
cpm = scheme_get_process_milliseconds();
|
||||
scheme_current_thread->accum_process_msec += (cpm - scheme_current_thread->current_start_process_msec);
|
||||
}
|
||||
|
||||
|
@ -3061,7 +3061,7 @@ static void start_child(Scheme_Thread * volatile child,
|
|||
|
||||
{
|
||||
intptr_t cpm;
|
||||
cpm = 0; // scheme_get_process_milliseconds();
|
||||
cpm = scheme_get_process_milliseconds();
|
||||
scheme_current_thread->current_start_process_msec = cpm;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user