lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
highres_timer.h
00001 /*****************************************************/
00002 /* lean Time                    (c) Tobias Zirr 2011 */
00003 /*****************************************************/
00004 
00005 #ifndef LEAN_TIME_HIGHRES_TIMER
00006 #define LEAN_TIME_HIGHRES_TIMER
00007 
00008 #include "../lean.h"
00009 
00010 namespace lean
00011 {
00012 namespace time
00013 {
00014 
00016 class highres_timer
00017 {
00018 private:
00019     uint8 m_frequency;
00020     uint8 m_time;
00021 
00022 public:
00024     LEAN_MAYBE_EXPORT highres_timer();
00025 
00027     LEAN_MAYBE_EXPORT void tick();
00028 
00030     LEAN_MAYBE_EXPORT double seconds() const;
00032     LEAN_MAYBE_EXPORT double milliseconds() const;
00033 };
00034 
00035 } // namespace
00036 
00037 using time::highres_timer;
00038 
00039 } // namespace
00040 
00041 #ifdef LEAN_INCLUDE_INLINED
00042 #include "source/highres_timer.cpp"
00043 #endif
00044 
00045 #endif