caculate FPS