From: kronbichler Date: Wed, 7 Jan 2009 08:10:00 +0000 (+0000) Subject: The Timer class can now also return the wall time for a calculation. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f095486b88cd46f03de6525f3feecf3ea1998e52;p=dealii-svn.git The Timer class can now also return the wall time for a calculation. git-svn-id: https://svn.dealii.org/trunk@18111 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/timer.h b/deal.II/base/include/base/timer.h index 140e0d13b9..f37ba086dd 100644 --- a/deal.II/base/include/base/timer.h +++ b/deal.II/base/include/base/timer.h @@ -38,7 +38,8 @@ DEAL_II_NAMESPACE_OPEN * * timer.stop (); * - * std::cout << "Elapsed time: " << timer() << " seconds."; + * std::cout << "Elapsed CPU time: " << timer() << " seconds."; + * std::cout << "Elapsed wall time: " << timer.wall_time() << " seconds."; * * // reset timer for the next thing it shall do * timer.reset(); @@ -87,11 +88,10 @@ class Timer void reset (); /** - * Access to the current time + * Access to the current CPU time * without disturbing time - * measurement. The elapsed time - * is returned in units of - * seconds. + * measurement. The elapsed time is + * returned in units of seconds. */ double operator() () const; @@ -151,16 +151,14 @@ class Timer */ double cumulative_time; - /** - * Accumulated waoo time for all + * Accumulated wall time for all * previous start()/stop() cycles. The * wall time for the present cycle is * not included. */ double cumulative_wall_time; - /** * Store whether the timer is presently * running. diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 908532e9d4..342fd8def2 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -324,6 +324,15 @@ inconvenience this causes.

base

    +
  1. +

    + New: The Timer class can now also return the wall time using the method + Timer::wall_time(), as opposed to the CPU time returned by + Timer::operator (). +
    + (Martin Kronbichler 2009/01/07) +

    +
  2. New: The new class types_are_equal allows to write some templates more