Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Class timer

boost::mpi::timer — A simple timer that provides access to the MPI timing facilities.

Synopsis

// In header: <boost/mpi/timer.hpp>


class timer {
public:

  // public member functions
  timer();
  void restart();
  double elapsed() const;
  double elapsed_max() const;
  double elapsed_min() const;

  // public static functions
  static bool time_is_global();
};

Description

The timer class is a simple wrapper around the MPI timing facilities that mimics the interface of the Boost Timer library.

timer public member functions

  1. timer();

    Initializes the timer

    Postconditions:

    elapsed() == 0

  2. void restart();

    Restart the timer.

    Postconditions:

    elapsed() == 0

  3. double elapsed() const;

    Return the amount of time that has elapsed since the last construction or reset, in seconds.

  4. 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.

  5. double elapsed_min() const;

    Returns the minimum non-zero value that elapsed() may return. This is the resolution of the timer.

timer public static functions

  1. static bool time_is_global();

    Determines whether the elapsed time values are global times or local processor times.


PrevUpHomeNext