On-screen Profiler / Debug visualizations in progress

Added on-screen FPS counter.
This commit is contained in:
2013-03-22 17:17:12 -07:00
parent a23b39a178
commit b34d90f41d
7 changed files with 104 additions and 15 deletions

View File

@@ -218,3 +218,9 @@ float KRContext::getAbsoluteTime() const
return m_absolute_time;
}
long KRContext::getAbsoluteTimeMilliseconds()
{
return (long)(mach_absolute_time() / 1000 * m_timebase_info.numer / m_timebase_info.denom); // Division done first to avoid potential overflow
}