From f095486b88cd46f03de6525f3feecf3ea1998e52 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Wed, 7 Jan 2009 08:10:00 +0000 Subject: [PATCH] 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 --- deal.II/base/include/base/timer.h | 14 ++++++-------- deal.II/doc/news/changes.h | 9 +++++++++ 2 files changed, 15 insertions(+), 8 deletions(-) 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 -- 2.39.5