Boost C++ Libraries Home Libraries People FAQ More

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:
  // 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();
};

Description

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

timer public construct/copy/destruct

  1. timer();

    Initializes the timer

    Postconditions:

    elapsed() == 0

timer public member functions

  1. void restart();

    Restart the timer.

    Postconditions:

    elapsed() == 0

  2. double elapsed() const;

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

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

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