long longFrameTime_ms = Integer.parseInt(SystemProperties.get("debug.longframe_ms", "16"));
long elapsedTime_us = now_us - mLastTime_us;
float fps = 1000000.f / elapsedTime_us;
if (mLastTime_us > 0 && elapsedTime_us > longFrameTime_ms*1000) {
Log.v(TAG, "Long frame: " + elapsedTime_us/1000.f + " ms (" + fps + " fps)");
if (mNumShortFramesElapsed > 0) {
Log.v(TAG, " Short frames since last long frame: " + mNumShortFramesElapsed);
mNumShortFramesElapsed = 0;
}
} else {
++mNumShortFramesElapsed;
}
mLastTime_us = now_us;