#include "config.h"
#endif
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
class Timer
{
virtual double timerEndAndReport (const char* const msg)
{
- timerEnd ();
+ double t = timerEnd ();
timerReport (msg);
+ return (t);
}
double getTimeElapsed (void) const
double ttime(void) const
{
+#ifdef HAVE_GETTIMEOFDAY
struct timeval now;
if (gettimeofday (&now, NULL))
return 0;
return (now.tv_sec + static_cast<double>(now.tv_usec) / 1000000.);
+#else
+ return 0;
+#endif
}
};
virtual double timerEndAndReport (const char* const msg)
{
- timerEnd ();
+ double t = timerEnd ();
timerReport (msg);
+ return (t);
}
virtual void timerReportAllProcesses (const char* const msg)
virtual double timerEndAndReport (const char* const msg)
{
- timerEnd ();
+ double t = timerEnd ();
timerReport (msg);
+ return (t);
}
virtual void timerReport (const char* const msg)