...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::mpi::timer — A simple timer that provides access to the MPI timing facilities.
// In header: <boost/mpi/timer.hpp> class timer { public: // construct/copy/destruct timer(); // public member functions void restart(); double elapsed() const; double elapsed_max() const; double elapsed_min() const; // public static functions static bool time_is_global(); };
The timer
class is a simple wrapper around the MPI timing facilities that mimics the interface of the Boost Timer library.
timer
public member functionsvoid restart();
Restart the timer.
Postconditions: |
|
double elapsed() const;
Return the amount of time that has elapsed since the last construction or reset, in seconds.
double elapsed_max() const;
Return an estimate of the maximum possible value of elapsed(). Note that this routine may return too high a value on some systems.
double elapsed_min() const;
Returns the minimum non-zero value that elapsed()
may return. This is the resolution of the timer.