From: David Wells Date: Thu, 17 Aug 2017 16:44:17 +0000 (-0400) Subject: Improve some of the Timer documentation. X-Git-Tag: v9.0.0-rc1~1214^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af0b271fa1304671518a7ea96c569193332da175;p=dealii.git Improve some of the Timer documentation. This commit fixes a few small things: 1. The example at the top of the Timer class used a deprecated function; this example now uses the replacement function. 2. The MPI communicator documentation was written for a different variable. 3. A few sentences have been rewritten to improve clarity. --- diff --git a/include/deal.II/base/timer.h b/include/deal.II/base/timer.h index 0e1e434f0b..af3c53354d 100644 --- a/include/deal.II/base/timer.h +++ b/include/deal.II/base/timer.h @@ -47,15 +47,15 @@ DEAL_II_NAMESPACE_OPEN * functions: * @code * Timer timer; - * timer.start (); + * timer.start(); * * // do some complicated computations here - * ... + * // ... * - * timer.stop (); + * timer.stop(); * - * std::cout << "Elapsed CPU time: " << timer() << " seconds."; - * std::cout << "Elapsed wall time: " << timer.wall_time() << " seconds."; + * std::cout << "Elapsed CPU time: " << timer.cpu_time() << " seconds.\n"; + * std::cout << "Elapsed wall time: " << timer.wall_time() << " seconds.\n"; * * // reset timer for the next thing it shall do * timer.reset(); @@ -174,7 +174,7 @@ public: double last_wall_time() const; /** - * Access to the current total wall time without stopping the timer. + * Access to the current total CPU time without stopping the timer. * The elapsed time is returned in units of seconds. */ double cpu_time() const; @@ -220,22 +220,24 @@ private: double cumulative_wall_time; /** - * Stores the wall time between the last start()/stop() cycle. + * Wall time between the last start()/stop() cycle. */ double last_lap_time; /** - * Stores the CPU time between the last start()/stop() cycle. + * CPU time between the last start()/stop() cycle. */ double last_lap_cpu_time; /** - * Store whether the timer is presently running. + * Whether or not the timer is presently running. */ bool running; /** - * Store whether the timer is presently running. + * The communicator over which various time values are synchronized and + * combined: see the documentation of the relevant constructor for + * additional information. */ MPI_Comm mpi_communicator;