Diana
0.8.3
|
00001 /* ----------------------------------------------------------------------------- 00002 * Diana process modelling, simulation and analysis software 00003 * Copyright (c) 2005, Michael Krasnyk 00004 * All rights reserved. 00005 * 00006 * This file is a part of Diana process modelling, simulation and analysis software 00007 * 00008 * Diana is free software; you can redistribute it and/or modify it 00009 * under the terms of the GNU General Public License as published 00010 * by the Free Software Foundation (see accompanying file LICENSE) 00011 * ----------------------------------------------------------------------------- 00012 * $Id$ 00013 * ----------------------------------------------------------------------------- 00014 * Description: 00015 */ 00016 00017 00018 #ifndef __TIMER_HPP 00019 #define __TIMER_HPP 00020 00021 #include <time.h> 00022 //this include just for asama 00023 #include "/usr/include/sys/timeb.h" 00024 #include <Diana.hpp> 00025 00026 class CTimer 00027 { 00028 private: 00029 struct timeb m_oStartTime, m_oTimeInterval, m_oEndTime; 00030 time_t StartTime, EndTime; 00031 public: 00032 CTimer(); 00033 void Run(); 00034 double Stop(); 00035 void Continue(); 00036 void Reset(); 00037 //function return time interval in milliseconds 00038 CapeLong GetTime(); 00039 }; 00040 00041 #endif