Table of Contents

Wiki > TV3D65 Index > TVEngine

TickCount

DESCRIPTION

Gets MS since the OS was started (though it does not have millisecond resolution; its value is typically updated every 16ms).

DECLARATION

VB.NET TickCount() As Integer
C++ int TickCount()

PARAMETERS

None

RETURN VALUE

Integer Description of what the return value means.

EXAMPLES

ExampleBasic example.

TIPS

  • Don’t use for game loops in the following way:

where curTime = tickCount; prevTime = tick count when you rendered; frameTime = time between frames

             while(curTime - prevTime > frameTime)
                    do loop;
       If you are trying to keep it at 100fps your frameTime will be 10ms for one frame.  However, since the accuracy of tickcount
       is only 16ms you will mis 6ms each frame thus, resulting in 65 fps or 350ms loss.
 
tvengine/tickcount.txt · Last modified: 2013/11/22 13:31