X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Ftimer.h;h=ba6ff3f671cc18228d78252aeac51d4fb5b473cd;hp=83d0fb4389dd95b1cb7a26fa6c529459b1a3cd31;hb=502e76319b484c32246707e33e70a428ac5dc6ad;hpb=6d225ee55693c0617d254e6fa283c00c71bd2919 diff --git a/check/timer.h b/check/timer.h index 83d0fb43..ba6ff3f6 100644 --- a/check/timer.h +++ b/check/timer.h @@ -3,7 +3,7 @@ * A simple stop watch class. */ /* - * GiNaC Copyright (C) 1999-2004 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,13 +17,20 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef TIMER_H #define TIMER_H +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef HAVE_RUSAGE #include +#else +#include +#endif class timer { public: @@ -35,7 +42,11 @@ public: bool running(); private: bool on; +#ifdef HAVE_RUSAGE struct rusage used1, used2; +#else + std::clock_t used1, used2; +#endif }; #endif // ndef TIMER_H