May be
[pascal](targetFPS *m_ticksPerSecond)[/pascal]
should be replaced with
[pascal](m_ticksPerSecond / targetFPS)[/pascal]
:?