Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::core::Timer Class Reference

In class ham ke maloom hast che kari anjam midahad. More...

#include <Timer.h>

Inheritance diagram for kge::core::Timer:
kge::KgeUnknown

Public Member Functions

 Timer ()
 Constructor.
 Timer (int fpsLimit)
 ~Timer ()
 Destructor.
int GetTime ()
 Returns the elapsed time in mili seconds.
bool NextFrame ()
float GetTimeElapsed ()
 Returns the elapsed time in seconds.
int GetTime2 ()
- Public Member Functions inherited from kge::KgeUnknown
 KgeUnknown ()
 Constructor.
virtual ~KgeUnknown ()
 Destructor.
virtual void AddRef ()
 Add a reference to the object.
virtual void DecRef ()
 Decrease a reference from the object. if its reference count get 0 then the object will destroy.
u32 GetRefCount ()
 Return resource reference count.
const char * GetDebugText ()
 returns the instance debug text.

Public Attributes

int fps
 For limiting the FPS.
int Interval

Protected Attributes

bool isFirstGetTimeCall
u64 lastTick
u64 base
u64 freq
int ims

Additional Inherited Members

- Protected Member Functions inherited from kge::KgeUnknown
void SetDebugText (char *text)

Detailed Description

In class ham ke maloom hast che kari anjam midahad.

Definition at line 18 of file Timer.h.

Constructor & Destructor Documentation

kge::core::Timer::Timer ( )

Constructor.

kge::core::Timer::Timer ( int  fpsLimit)

Constructor

Parameters
fpsLimitFor limiting the FPS.
kge::core::Timer::~Timer ( )
inline

Destructor.

Definition at line 30 of file Timer.h.

Member Function Documentation

int kge::core::Timer::GetTime ( )

Returns the elapsed time in mili seconds.

int kge::core::Timer::GetTime2 ( )
float kge::core::Timer::GetTimeElapsed ( )

Returns the elapsed time in seconds.

bool kge::core::Timer::NextFrame ( )

If the Interval time reached returns true

See Also
Interval

Member Data Documentation

u64 kge::core::Timer::base
protected

Definition at line 56 of file Timer.h.

int kge::core::Timer::fps

For limiting the FPS.

Definition at line 40 of file Timer.h.

u64 kge::core::Timer::freq
protected

Definition at line 57 of file Timer.h.

int kge::core::Timer::ims
protected

Definition at line 58 of file Timer.h.

int kge::core::Timer::Interval

Sets the interval in mili seconds

See Also
NextFrame

Definition at line 44 of file Timer.h.

bool kge::core::Timer::isFirstGetTimeCall
protected

Definition at line 53 of file Timer.h.

u64 kge::core::Timer::lastTick
protected

Definition at line 55 of file Timer.h.


The documentation for this class was generated from the following file: