From: Wolfgang Bangerth Date: Mon, 13 Jul 1998 14:12:52 +0000 (+0000) Subject: Make timer work correctly on Linux where the number of CLOCKS_PER_SECOND is not 1e6... X-Git-Tag: v8.0.0~22809 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07e0b92fa294af32025784c357f78ef1acc078be;p=dealii.git Make timer work correctly on Linux where the number of CLOCKS_PER_SECOND is not 1e6 but rather 1e3. git-svn-id: https://svn.dealii.org/trunk@445 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/source/timer.cc b/deal.II/base/source/timer.cc index 39b2f2af6a..674773ca91 100644 --- a/deal.II/base/source/timer.cc +++ b/deal.II/base/source/timer.cc @@ -6,11 +6,11 @@ #ifndef TIMER -#define TIMER clock() +#define TIMER static_cast(clock()) #endif #ifndef DIVIDE -#define DIVIDE 1.e6 +#define DIVIDE CLOCKS_PER_SEC #endif #ifndef OVER_TIME #define OVER_TIME 4294967296./DIVIDE