Skip to content
Snippets Groups Projects
RunTime.h 808 B
Newer Older
  • Learn to ignore specific revisions
  • Lars Bilke's avatar
    Lars Bilke committed
    /**
    
    Lars Bilke's avatar
    Lars Bilke committed
     * Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.net)
     *            Distributed under a Modified BSD License.
     *              See accompanying file LICENSE.txt or
     *              http://www.opengeosys.net/LICENSE.txt
     *
     *
    
    Lars Bilke's avatar
    Lars Bilke committed
     * \file RunTime.h
    
    Lars Bilke's avatar
    Lars Bilke committed
     * Created on 2012-05-10 by Thomas Fischer
    
    #include "TimeMeasurementBase.h"
    
    #ifndef _WIN32
    
    #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 _WIN32
    
    	timeval _start;
    	timeval _stop;
    
    #else
    	unsigned long _start;
    	unsigned long _stop;
    #endif
    
    #endif