use QElapsedTimer for frameTime and totalTime.