[Dune-devel] [Dune-Commit] dune-common r7095 - trunk/dune/common
Oliver Sander
sander at igpm.rwth-aachen.de
Mon Jan 28 22:23:25 CET 2013
Hi,
I just found this out the hard way recently. Is it a bug or a feature?
What is the total run time of all threads added together good for?
best,
Oliver
Am 28.01.2013 22:19, schrieb sander at dune-project.org:
> Author: sander
> Date: 2013-01-28 22:19:35 +0100 (Mon, 28 Jan 2013)
> New Revision: 7095
>
> Modified:
> trunk/dune/common/timer.hh
> Log:
> warn about Timer not returning wall-time for multi-threaded code
>
> Modified: trunk/dune/common/timer.hh
> ===================================================================
> --- trunk/dune/common/timer.hh 2013-01-28 20:05:58 UTC (rev 7094)
> +++ trunk/dune/common/timer.hh 2013-01-28 21:19:35 UTC (rev 7095)
> @@ -40,6 +40,11 @@
> on your OS kernel which should be somewhere in the milisecond range.
>
> The class is basically a wrapper for the libc-function getrusage()
> +
> + \warning In a multi-threading situation, this class does NOT return wall-time!
> + Instead, the run time for all threads will be added up.
> + For example, if you have four threads running in parallel taking one second each,
> + then the Timer class will return an elapsed time of four seconds.
>
> */
> class Timer
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
More information about the Dune-devel
mailing list