Skip to content
Snippets Groups Projects
RunTime.h 866 B
Newer Older
  • Learn to ignore specific revisions
  • Lars Bilke's avatar
    Lars Bilke committed
    /**
    
    Lars Bilke's avatar
    Lars Bilke committed
     * \file
     * \author Thomas Fischer
     * \date   2012-05-10
     * \brief  Definition of the RunTime class.
     *
     * \copyright
    
    Lars Bilke's avatar
    Lars Bilke committed
     * Copyright (c) 2013, OpenGeoSys Community (http://www.opengeosys.org)
    
    Lars Bilke's avatar
    Lars Bilke committed
     *            Distributed under a Modified BSD License.
     *              See accompanying file LICENSE.txt or
    
    Lars Bilke's avatar
    Lars Bilke committed
     *              http://www.opengeosys.org/project/license
    
    Lars Bilke's avatar
    Lars Bilke committed
     *
    
    #include "TimeMeasurementBase.h"
    
    
    #ifndef _MSC_VER
    
    #include <sys/time.h>
    
    #else
    #include <windows.h>
    #endif
    
    
    #include "TimeMeasurementBase.h"
    
    
    namespace BaseLib {
    
    class RunTime : public TimeMeasurementBase
    
    {
    public:
    
    	virtual void start();
    	virtual void stop();
    	virtual double elapsed();
    
    private:
    
    #ifndef _MSC_VER
    
    	timeval _start;
    	timeval _stop;
    
    #else
    	unsigned long _start;
    	unsigned long _stop;
    #endif
    
    #endif