My Project
D:/source/c++/Programme/sally/sally/sallyAPI/Counter.h
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 #pragma once
00029 
00030 #include "Define.h"
00031 
00032 namespace SallyAPI
00033 {
00034         namespace Core
00035         {
00044 
00045                 class DLL_API_SALLY CCounter
00046                 {
00047                 private:
00048                         LONGLONG        m_lPerfCnt;
00049                         LONGLONG        m_lNextTime;
00050                         LONGLONG        m_lLastTime;
00051                         LONGLONG        m_lCurrentTime;
00052                         double          m_dTimeScale;
00053                         DWORD           m_dwTimeCount;
00054                         bool            m_bPerformanceFlag;
00055                         float           m_fTimeElapsed;
00056 
00057                         void            UpdateCurrentTime();
00058                 public:
00059                         CCounter();
00060                         ~CCounter();
00061 
00062                         void            CalculateNextFrame();
00063                         void            CalculateElapsedTime();
00064                         bool            RenderNextFrame();
00065                         float           GetElapsedTime();
00066                         float           GetElapsedTimeStatic();
00067                 };
00068         }
00069 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines