From 6de86fc1058e6b3e009f7dc88ccc52c66f602b6f Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Tue, 9 Apr 2024 17:47:28 +0200 Subject: [PATCH] Remove HAVE_TMS code (#2815) --- src/parallel/bbs.cpp | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/src/parallel/bbs.cpp b/src/parallel/bbs.cpp index 95962ccbe2..2a51b20c55 100644 --- a/src/parallel/bbs.cpp +++ b/src/parallel/bbs.cpp @@ -11,16 +11,9 @@ #include "bbsrcli.h" #endif -#if defined(HAVE_TMS) && !NRNMPI -#include -#include -#include -static struct tms tmsbuf, tms_start_; -static clock_t starttime; -#endif - extern int nrn_global_argc; extern char** nrn_global_argv; +extern double nrn_timeus(); bool BBSImpl::is_master_ = false; bool BBSImpl::started_ = false; @@ -132,11 +125,7 @@ double BBSImpl::time() { #if NRNMPI return nrnmpi_wtime(); #else -#ifdef HAVE_TMS - return double(times(&tmsbuf)) / 100.; -#else - return 0.; -#endif + return nrn_timeus(); #endif } @@ -493,18 +482,6 @@ void BBSImpl::done() { return; } done_ = true; -#ifdef HAVE_TMS - clock_t elapsed = times(&tmsbuf) - starttime; - printf("%d tasks in %g seconds. %g seconds waiting for tasks\n", - etaskcnt, - total_exec_time, - worker_take_time); - printf("user=%g sys=%g elapsed=%g %g%%\n", - (double) (tmsbuf.tms_utime - tms_start_.tms_utime) / 100, - (double) (tmsbuf.tms_stime - tms_start_.tms_stime) / 100, - (double) (elapsed) / 100, - 100. * (double) (tmsbuf.tms_utime - tms_start_.tms_utime) / (double) elapsed); -#endif } void BBSImpl::start() { @@ -512,7 +489,4 @@ void BBSImpl::start() { return; } started_ = 1; -#ifdef HAVE_TMS - starttime = times(&tms_start_); -#endif }