Clock.hh

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // CERTI - HLA RunTime Infrastructure
00003 // Copyright (C) 2002-2005  ONERA
00004 //
00005 // This program is free software ; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public License
00007 // as published by the Free Software Foundation ; either version 2 of
00008 // the License, or (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful, but
00011 // WITHOUT ANY WARRANTY ; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this program ; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00018 // ----------------------------------------------------------------------------
00019 
00020 #ifndef CLOCK_HH_
00021 #define CLOCK_HH_
00022 
00023 
00024 
00025 #include <string>
00026 #include "certi.hh"
00027 
00028 namespace certi {
00029 
00040 class CERTI_EXPORT Clock
00041 {
00042 public:
00047     Clock(const std::string newName);
00052     const std::string getName() const {return name;};
00057     virtual double getResolution()                 = 0;
00062     virtual uint64_t getCurrentTicksValue()          = 0;
00069     virtual uint64_t getDeltaTicks(const uint64_t previousTicks);
00076     virtual double   tick2NanoSecond(const uint64_t ticks)  = 0;
00083     virtual double   getDeltaNanoSecond(const uint64_t firstTicks, const uint64_t secondTicks);
00084 
00090     virtual double   getDeltaNanoSecond(const uint64_t previousTicks);
00091 
00092     virtual ~Clock();
00093 
00098     static Clock* getBestClock (); 
00099 protected:
00100     std::string name;
00101 };
00102 
00103 }
00104 
00105 #endif /*CLOCK_HH_*/

Generated on Thu Apr 30 15:53:48 2009 for CERTIDeveloperDocumentation by doxygen 1.5.5