⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cfpscounter.h

📁 一个基于symbian s60 3rd 的3D汽车游戏演示程序,模拟器上编译通过。
💻 H
字号:
   /*
============================================================================
    * Name : CFpsCounter.h
    * Part of : Example3D
    * Description : Definition of CFpsCounter
    * Copyright (c) 2007 Nokia Corporation
============================================================================
    */

#ifndef __CFPSCOUNTER_H__
#define __CFPSCOUNTER_H__

// INCLUDES
#include <e32base.h>

// CLASS DECLARATION

/**
*  Utility class to count application speed
*  in frames per second
*/

class CFpsCounter
    : public CBase
    {
    public:
        /// Two-phased constructor
        static CFpsCounter* NewL( TInt aInterval );

        /// Destructor
        ~CFpsCounter();
    
    private:
        
        /// Default constructor
        /// @param aInterval update interval in seconds
        CFpsCounter( TInt aInterval );
        
    public: // New methods
    
        /// Frames per second
        /// @return frames per second count
        TInt Fps();

        /// Updates counter
        /// This must be called every time a frame is drawn
        void Update();

        /// Sets update interval
        /// @param aInterval interval in seconds
        void SetInterval( TInt aInterval );

    private: // data

        TInt iSecs;
        TInt iInterval;
        TInt iFrames;
        TInt iSeconds;
        TInt iStartTicks;
        TInt iTicksPerSecond;
        TInt iFps;
    };
    
    
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -