Added benchmark system around common functions in main game loop.