diff --git a/src/interpret.c b/src/interpret.c index 8f004f53799640b3ab6d9c2b673c087ccc12b7c1..201d69c0c5e48af723e2623f11414e1c500b3214 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 c622fedc6de9a0274d3f85896fd18502dbad37a9..81017267a662636e0b8ff68bd921afddfd2a1c4b 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)