]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make timer work correctly on Linux where the number of CLOCKS_PER_SECOND is not 1e6...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 13 Jul 1998 14:12:52 +0000 (14:12 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 13 Jul 1998 14:12:52 +0000 (14:12 +0000)
git-svn-id: https://svn.dealii.org/trunk@445 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/timer.cc

index 39b2f2af6a0915c6598f1dc8f00f27c7fba218e8..674773ca917bfbec8fe985a907a6082830350b31 100644 (file)
@@ -6,11 +6,11 @@
 
 
 #ifndef TIMER
-#define TIMER clock()
+#define TIMER static_cast<double>(clock())
 #endif
 
 #ifndef DIVIDE
-#define DIVIDE 1.e6
+#define DIVIDE CLOCKS_PER_SEC
 #endif
 #ifndef OVER_TIME
 #define OVER_TIME 4294967296./DIVIDE

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.