Program Listing for File stopwatch.hpp

Return to documentation for file (/tmp/ws/src/ecl_core/ecl_time/include/ecl/time/stopwatch.hpp)

/*****************************************************************************
** Ifdefs
*****************************************************************************/

#ifndef ECL_STOPWATCH_HPP_
#define ECL_STOPWATCH_HPP_

/*****************************************************************************
** Includes
*****************************************************************************/

#include <ecl/config/macros.hpp>
#include "timestamp.hpp"
#include "macros.hpp"

#ifdef ECL_HAS_TIMESTAMP

/*****************************************************************************
** Namespaces
*****************************************************************************/

namespace ecl {

/*****************************************************************************
** Classes
*****************************************************************************/
class ecl_time_PUBLIC StopWatch
{
    public:
        StopWatch();

        virtual ~StopWatch() {}
        void restart();

        TimeStamp elapsed();
        TimeStamp split();

    private:
        TimeStamp start_time, split_time;
};


} // namespace ecl

#endif /* ECL_HAS_TIMESTAMP */
#endif /* ECL_STOPWATCH_HPP_ */