From 3e5b13a74fa6b9b980c92aa52093e72dd3540feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Thu, 19 Nov 1998 22:46:58 -0800 Subject: [PATCH] bugfix (I hope) Rev: src/interpret.c:1.101 Rev: src/threads.h:1.55 --- src/interpret.c | 6 +++--- src/threads.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/interpret.c b/src/interpret.c index 8f004f5379..201d69c0c5 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: interpret.c,v 1.100 1998/11/20 01:57:21 hubbe Exp $"); +RCSID("$Id: interpret.c,v 1.101 1998/11/20 06:46:56 hubbe Exp $"); #include "interpret.h" #include "object.h" #include "program.h" @@ -1800,7 +1800,7 @@ void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2) #ifdef PROFILING #ifdef HAVE_GETHRTIME long long children_base = accounted_time; - long long start_time = gethrtime(); + long long start_time = gethrtime() - time_base; unsigned INT32 self_time_base; #endif #endif @@ -2107,7 +2107,7 @@ void mega_apply(enum apply_type type, INT32 args, void *arg1, void *arg2) { long long time_passed, time_in_children, self_time; time_in_children= accounted_time - children_base; - time_passed = gethrtime() - start_time; + time_passed = gethrtime() - time_base - start_time; self_time=time_passed - time_in_children; accounted_time+=self_time; #ifdef DEBUG diff --git a/src/threads.h b/src/threads.h index c622fedc6d..81017267a6 100644 --- a/src/threads.h +++ b/src/threads.h @@ -1,5 +1,5 @@ /* - * $Id: threads.h,v 1.54 1998/11/20 01:57:24 hubbe Exp $ + * $Id: threads.h,v 1.55 1998/11/20 06:46:58 hubbe Exp $ */ #ifndef THREADS_H #define THREADS_H @@ -363,7 +363,7 @@ struct thread_state { (_tmp)->stack_top=stack_top; \ (_tmp)->thread_id=thread_id;\ DO_IF_PROFILING( (_tmp)->accounted_time=accounted_time; ) \ - DO_IF_PROFILING( (_tmp)->time_base = gethrvtime() - time_base; ) \ + DO_IF_PROFILING( (_tmp)->time_base = gethrtime() - time_base; ) \ SWAP_OUT_TRACE(_tmp); \ } while(0) @@ -380,7 +380,7 @@ struct thread_state { stack_top=(_tmp)->stack_top;\ thread_id=(_tmp)->thread_id;\ DO_IF_PROFILING( accounted_time=(_tmp)->accounted_time; ) \ - DO_IF_PROFILING( time_base = (_tmp)->time_base + gethrvtime(); ) \ + DO_IF_PROFILING( time_base = (_tmp)->time_base + gethrtime(); ) \ SWAP_IN_TRACE(_tmp); \ } while(0) -- GitLab