gml_Timer.h

Go to the documentation of this file.
00001 /** @file gml_Timer.h
00002  * 
00003  *  Define the gml_TTimer class.
00004  * 
00005  * Copyright (c) 2001 CLIPS-IMAG
00006  * 
00007  * See the file "gml_LicenseTerms.txt" for information on usage and redistribution
00008  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00009  * 
00010  *  Created on January 13, 2004 (JL).
00011  */
00012 
00013 #ifndef __GML_TIMER__
00014 #define __GML_TIMER__
00015 
00016 // project includes
00017 #include "gml/base/gml_Errors.h"
00018 #include "gml/base/gml_Types.h"
00019 
00020 
00021 /** 
00022  *  gml_TTimer --
00023  * 
00024  *    Timer objects with fine granularity.
00025  */
00026 class gml_TTimer
00027 {
00028 public:
00029 
00030   gml_TError    Init ();    ///< Call Reset ()
00031   void          Dispose (); ///< Do nothing
00032   void          Reset ();   ///< Zero accumulated time
00033   void          Mark ();    ///< Mark the current time
00034   UInt64        Get ();     ///< Return the accumulated time
00035   UInt64        Lap ();     ///< Return the time elapsed since the last time mark,
00036                             ///<   add it to the accumulated time,
00037                             ///<   and mark the current time
00038   static 
00039   UInt64        Time ();    ///< return the current absolute time
00040 
00041 
00042 protected:
00043 
00044   UInt64 fAccumulator;      ///< accumulated time
00045   UInt64 fTimeStamp;        ///< last marked time
00046 };
00047 
00048 #endif /* ifndef __GML_TIMER__ */
00049 
Generated on Tue Jun 12 14:03:27 2007 for gml by Doxygen 1.5.2.