Proud::CMilisecTimer Class Referenceabstract

Public Member Functions

virtual void Reset ()=0
virtual void Start ()=0
virtual void Stop ()=0
virtual void Advance ()=0
virtual int64_t GetTimeMs ()=0
virtual int64_t GetElapsedTimeMs ()=0
virtual bool IsStopped ()=0

Static Public Member Functions

static PROUD_API CMilisecTimerNew ()

Detailed Description

It is a timer whose degree of precision is millisecond. Create by “CMilisecTimer::New” and delete by “delete”. QueryPerformanceCounter is internally used. No problem with precision but wrong calculation might occur depending on Windows version & CPU. Can use it up to 81706 after turning on the computer.

Member Function Documentation

virtual void Proud::CMilisecTimer::Advance ( )
pure virtual

Move the timer 0.1 second forward

virtual int64_t Proud::CMilisecTimer::GetElapsedTimeMs ( )
pure virtual

TODO:translate needed. Get the elapsed time from the previous GetElapsedTimeMs() call.

  • In the case of MMTimer, there may be a problem with the accuracy.
  • In the case of QPC, you get accurate time, but it is 50 times slower than GetTickCount().
virtual int64_t Proud::CMilisecTimer::GetTimeMs ( )
pure virtual

Gets current time

virtual bool Proud::CMilisecTimer::IsStopped ( )
pure virtual

Returns true when timer is paused

static PROUD_API CMilisecTimer* Proud::CMilisecTimer::New ( )

TODO:translate needed. Designate the type to generate the timer.

virtual void Proud::CMilisecTimer::Reset ( )
pure virtual

Initialize the timer

virtual void Proud::CMilisecTimer::Start ( )
pure virtual

Start the timer

virtual void Proud::CMilisecTimer::Stop ( )
pure virtual

Temporarily stop the timer.